Add files via upload

This commit is contained in:
MuramasaM 2022-07-04 13:17:16 -07:00 committed by GitHub
parent 3e5ab8b5c6
commit e30e032299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 18014 additions and 9200 deletions

View File

@ -3,6 +3,8 @@
-- Created by Ben T. 10/29/10 -- Created by Ben T. 10/29/10
-- Please note that these are loaded in a specific order to diminish errors/perceived load time by user -- Please note that these are loaded in a specific order to diminish errors/perceived load time by user
local scriptContext = game:GetService("ScriptContext") local scriptContext = game:GetService("ScriptContext")
local touchEnabled = false
pcall(function() touchEnabled = game:GetService("UserInputService").TouchEnabled end)
-- library registration -- library registration
scriptContext:AddCoreScript(2, scriptContext,"/Libraries/LibraryRegistration/LibraryRegistration") scriptContext:AddCoreScript(2, scriptContext,"/Libraries/LibraryRegistration/LibraryRegistration")
@ -25,36 +27,52 @@ scriptContext:AddCoreScript(3, scriptContext, "CoreScripts/Sections")
waitForChild(game:GetService("CoreGui"),"RobloxGui") waitForChild(game:GetService("CoreGui"),"RobloxGui")
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
-- ToolTipper (creates tool tips for gui) if not touchEnabled then
scriptContext:AddCoreScript(4,screenGui,"CoreScripts/ToolTip") -- ToolTipper (creates tool tips for gui)
scriptContext:AddCoreScript(4,screenGui,"CoreScripts/ToolTip")
-- SettingsScript -- SettingsScript
scriptContext:AddCoreScript(5,screenGui,"CoreScripts/Settings") scriptContext:AddCoreScript(5,screenGui,"CoreScripts/Settings")
end
-- MainBotChatScript
scriptContext:AddCoreScript(6,screenGui,"CoreScripts/MainBotChatScript")
-- New Player List
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
-- Popup Script
scriptContext:AddCoreScript(8,screenGui,"CoreScripts/PopupScript")
-- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(9,screenGui,"CoreScripts/NotificationScript")
-- Chat script
scriptContext:AddCoreScript(10, screenGui, "CoreScripts/ChatScript")
-- For Deepak Testing -- For Deepak Testing
pcall(function() pcall(function()
waitForProperty(game,"PlaceId") waitForProperty(game,"PlaceId")
if game.PlaceId == deepakTestingPlace then if game.PlaceId == deepakTestingPlace then
scriptContext:AddCoreScript(52177626,screenGui,"CoreScripts/RBXStatusBuffsGUIScript") scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
scriptContext:AddCoreScript(52177590,screenGui,"CoreScripts/HealthScript v4.0") scriptContext:AddCoreScript(52177590,screenGui,"HealthScript v4.0")
end end
end) end)
-- MainBotChatScript
scriptContext:AddCoreScript(6,screenGui,"CoreScripts/MainBotChatScript")
-- Popup Script
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PopupScript")
-- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(8,screenGui,"CoreScripts/NotificationScript")
-- Chat script
scriptContext:AddCoreScript(9, screenGui, "CoreScripts/ChatScript")
-- Purchase Prompt Script
scriptContext:AddCoreScript(10, screenGui, "CoreScripts/PurchasePromptScript")
if not touchEnabled then
-- New Player List
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
elseif screenGui.AbsoluteSize.Y > 600 then
-- New Player List
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
else
delay(5, function()
if screenGui.AbsoluteSize.Y >= 600 then
-- New Player List
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
end
end)
end
if game.CoreGui.Version >= 3 then if game.CoreGui.Version >= 3 then
-- Backpack Builder, creates most of the backpack gui -- Backpack Builder, creates most of the backpack gui
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/BackpackScripts/BackpackBuilder") scriptContext:AddCoreScript(12,screenGui,"CoreScripts/BackpackScripts/BackpackBuilder")
waitForChild(screenGui,"CurrentLoadout") waitForChild(screenGui,"CurrentLoadout")
waitForChild(screenGui,"Backpack") waitForChild(screenGui,"Backpack")
@ -62,13 +80,35 @@ if game.CoreGui.Version >= 3 then
-- Manager handles all big backpack state changes, other scripts subscribe to this and do things accordingly -- Manager handles all big backpack state changes, other scripts subscribe to this and do things accordingly
if game.CoreGui.Version >= 7 then if game.CoreGui.Version >= 7 then
scriptContext:AddCoreScript(12,Backpack,"CoreScripts/BackpackScripts/BackpackManager") scriptContext:AddCoreScript(13,Backpack,"CoreScripts/BackpackScripts/BackpackManager")
end end
-- Backpack Gear (handles all backpack gear tab stuff) -- Backpack Gear (handles all backpack gear tab stuff)
game:GetService("ScriptContext"):AddCoreScript(13,Backpack,"CoreScripts/BackpackScripts/BackpackGear") game:GetService("ScriptContext"):AddCoreScript(14,Backpack,"CoreScripts/BackpackScripts/BackpackGear")
-- Loadout Script, used for gear hotkeys -- Loadout Script, used for gear hotkeys
scriptContext:AddCoreScript(14,screenGui.CurrentLoadout,"CoreScripts/BackpackScripts/LoadoutScript") scriptContext:AddCoreScript(15,screenGui.CurrentLoadout,"CoreScripts/BackpackScripts/LoadoutScript")
-- Wardrobe script handles all character dressing operations if game.CoreGui.Version >= 8 then
scriptContext:AddCoreScript(4336,Backpack,"CoreScripts/BackpackScripts/BackpackWardrobe") -- Wardrobe script handles all character dressing operations
scriptContext:AddCoreScript(-1,Backpack,"CoreScripts/BackpackScripts/BackpackWardrobe")
end
end
local IsPersonalServer = not not game.Workspace:FindFirstChild("PSVariable")
if IsPersonalServer then
game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
end
game.Workspace.ChildAdded:connect(function(nchild)
if nchild.Name=='PSVariable' and nchild:IsA('BoolValue') then
IsPersonalServer = true
game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
end
end)
if touchEnabled then -- touch devices don't use same control frame
waitForChild(screenGui, 'ControlFrame')
waitForChild(screenGui.ControlFrame, 'BottomLeftControl')
screenGui.ControlFrame.BottomLeftControl.Visible = false
waitForChild(screenGui.ControlFrame, 'TopLeftControl')
screenGui.ControlFrame.TopLeftControl.Visible = false
end end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

147
public/asset/16 Normal file
View File

@ -0,0 +1,147 @@
%16%
-- Responsible for giving out tools in personal servers
-- first, lets see if buildTools have already been created
-- create the object in lighting (TODO: move to some sort of "container" object when we have one)
local toolsArray = game.Lighting:FindFirstChild("BuildToolsModel")
local ownerArray = game.Lighting:FindFirstChild("OwnerToolsModel")
local hasBuildTools = false
function getIds(idTable, assetTable)
for i = 1, #idTable do
local model = game:GetService("InsertService"):LoadAsset(idTable[i])
if model then
local children = model:GetChildren()
for i = 1, #children do
if children[i]:IsA("Tool") then
table.insert(assetTable,children[i])
end
end
end
end
end
function storeInLighting(modelName, assetTable)
local model = Instance.new("Model")
model.Archivable = false
model.Name = modelName
for i = 1, #assetTable do
assetTable[i].Parent = model
end
if not game.Lighting:FindFirstChild(modelName) then -- no one beat us to it, we get to insert
model.Parent = game.Lighting
end
end
if not toolsArray then -- no one has made build tools yet, we get to!
local buildToolIds = {}
local ownerToolIds = {}
table.insert(buildToolIds,73089166) -- PartSelectionTool
table.insert(buildToolIds,73089190) -- DeleteTool
table.insert(buildToolIds,73089204) -- CloneTool
table.insert(buildToolIds,73089214) -- RotateTool
table.insert(buildToolIds,73089239) -- ConfigTool
table.insert(buildToolIds,73089259) -- WiringTool
table.insert(buildToolIds,58921588) -- ClassicTool
table.insert(ownerToolIds, 65347268)
-- next, create array of our tools
local buildTools = {}
local ownerTools = {}
getIds(buildToolIds, buildTools)
getIds(ownerToolIds, ownerTools)
storeInLighting("BuildToolsModel",buildTools)
storeInLighting("OwnerToolsModel",ownerTools)
toolsArray = game.Lighting:FindFirstChild("BuildToolsModel")
ownerArray = game.Lighting:FindFirstChild("OwnerToolsModel")
end
local localBuildTools = {}
function giveBuildTools()
if not hasBuildTools then
hasBuildTools = true
local theTools = toolsArray:GetChildren()
for i = 1, #theTools do
local toolClone = theTools[i]:clone()
if toolClone then
toolClone.Parent = game.Players.LocalPlayer.Backpack
table.insert(localBuildTools,toolClone)
end
end
end
end
function giveOwnerTools()
local theOwnerTools = ownerArray:GetChildren()
for i = 1, #theOwnerTools do
local ownerToolClone = theOwnerTools[i]:clone()
if ownerToolClone then
ownerToolClone.Parent = game.Players.LocalPlayer.Backpack
table.insert(localBuildTools,ownerToolClone)
end
end
end
function removeBuildTools()
if hasBuildTools then
hasBuildTools = false
for i = 1, #localBuildTools do
localBuildTools[i].Parent = nil
end
localBuildTools = {}
end
end
if game.Players.LocalPlayer.HasBuildTools then
giveBuildTools()
end
if game.Players.LocalPlayer.PersonalServerRank >= 255 then
giveOwnerTools()
end
local debounce = false
game.Players.LocalPlayer.Changed:connect(function(prop)
if prop == "HasBuildTools" then
while debounce do
wait(0.5)
end
debounce = true
if game.Players.LocalPlayer.HasBuildTools then
giveBuildTools()
else
removeBuildTools()
end
if game.Players.LocalPlayer.PersonalServerRank >= 255 then
giveOwnerTools()
end
debounce = false
elseif prop == "PersonalServerRank" then
if game.Players.LocalPlayer.PersonalServerRank >= 255 then
giveOwnerTools()
elseif game.Players.LocalPlayer.PersonalServerRank <= 0 then
game.Players.LocalPlayer:Remove() -- you're banned, goodbye!
end
end
end)
game.Players.LocalPlayer.CharacterAdded:connect(function()
hasBuildTools = false
if game.Players.LocalPlayer.HasBuildTools then
giveBuildTools()
end
if game.Players.LocalPlayer.PersonalServerRank >= 255 then
giveOwnerTools()
end
end)

3845
public/asset/17 Normal file

File diff suppressed because it is too large Load Diff

24
public/asset/18 Normal file
View File

@ -0,0 +1,24 @@
%18%
local t = {}
t.Foo =
function()
print("foo")
end
t.Bar =
function()
print("bar")
end
t.Help =
function(funcNameOrFunc)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
if funcNameOrFunc == "Foo" or funcNameOrFunc == t.Foo then
return "Function Foo. Arguments: None. Side effect: prints foo"
elseif funcNameOrFunc == "Bar" or funcNameOrFunc == t.Bar then
return "Function Bar. Arguments: None. Side effect: prints bar"
end
end
return t

1116
public/asset/19 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,71 +1,23 @@
%2% %2%
-- this script is responsible for keeping the gui proportions under control -- Library Registration Script
-- This script is used to register RbxLua libraries on game servers, so game scripts have
-- access to all of the libraries (otherwise only local scripts do)
local screen = script.Parent local sc = game:GetService("ScriptContext")
local tries = 0
local BottomLeftControl
local BottomRightControl
local TopLeftControl
local BuildTools
local controlFrame = script.Parent:FindFirstChild("ControlFrame")
local loadoutPadding = 43
local currentLoadout
BottomLeftControl = controlFrame:FindFirstChild("BottomLeftControl")
BottomRightControl = controlFrame:FindFirstChild("BottomRightControl")
TopLeftControl = controlFrame:FindFirstChild("TopLeftControl")
currentLoadout = script.Parent:FindFirstChild("CurrentLoadout")
BuildTools = controlFrame:FindFirstChild("BuildTools")
function makeYRelative()
BottomLeftControl.SizeConstraint = 2
BottomRightControl.SizeConstraint = 2
if TopLeftControl then TopLeftControl.SizeConstraint = 2 end
if currentLoadout then currentLoadout.SizeConstraint = 2 end
if BuildTools then BuildTools.Frame.SizeConstraint = 2 end
BottomLeftControl.Position = UDim2.new(0,0,1,-BottomLeftControl.AbsoluteSize.Y)
BottomRightControl.Position = UDim2.new(1,-BottomRightControl.AbsoluteSize.X,1,-BottomRightControl.AbsoluteSize.Y)
while not sc and tries < 3 do
tries = tries + 1
sc = game:GetService("ScriptContext")
wait(0.2)
end end
if sc then
sc:RegisterLibrary("Libraries/RbxGui", "17")
function makeXRelative() sc:RegisterLibrary("Libraries/RbxGear", "18")
sc:RegisterLibrary("Libraries/RbxUtility", "19")
BottomLeftControl.SizeConstraint = 1 sc:RegisterLibrary("Libraries/RbxStamper", "20")
BottomRightControl.SizeConstraint = 1 sc:LibraryRegistrationComplete()
if TopLeftControl then TopLeftControl.SizeConstraint = 1 end else
if currentLoadout then currentLoadout.SizeConstraint = 1 end print("failed to find script context, libraries did not load")
if BuildTools then BuildTools.Frame.SizeConstraint = 1 end
BottomLeftControl.Position = UDim2.new(0,0,1,-BottomLeftControl.AbsoluteSize.Y)
BottomRightControl.Position = UDim2.new(1,-BottomRightControl.AbsoluteSize.X,1,-BottomRightControl.AbsoluteSize.Y)
end end
local function resize()
if screen.AbsoluteSize.x > screen.AbsoluteSize.y then
makeYRelative()
else
makeXRelative()
end
if currentLoadout then
currentLoadout.Position =
UDim2.new(0,screen.AbsoluteSize.X/2 -currentLoadout.AbsoluteSize.X/2,currentLoadout.Position.Y.Scale,-currentLoadout.AbsoluteSize.Y - loadoutPadding)
end
end
screen.Changed:connect(function(property)
if property == "AbsoluteSize" then
wait()
resize()
end
end)
wait()
resize()

2208
public/asset/20 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,291 +1 @@
%3% %3%
-- creates the in-game gui sub menus for property tools
-- written 9/27/2010 by Ben (jeditkacheff)
local gui = script.Parent
if gui:FindFirstChild("ControlFrame") then
gui = gui:FindFirstChild("ControlFrame")
end
local currentlySelectedButton = nil
local localAssetBase = "rbxasset://textures/ui/"
local selectedButton = Instance.new("ObjectValue")
selectedButton.RobloxLocked = true
selectedButton.Name = "SelectedButton"
selectedButton.Parent = gui.BuildTools
local closeButton = Instance.new("ImageButton")
closeButton.Name = "CloseButton"
closeButton.RobloxLocked = true
closeButton.BackgroundTransparency = 1
closeButton.Image = localAssetBase .. "CloseButton.png"
closeButton.ZIndex = 2
closeButton.Size = UDim2.new(0.2,0,0.05,0)
closeButton.AutoButtonColor = false
closeButton.Position = UDim2.new(0.75,0,0.01,0)
function setUpCloseButtonState(button)
button.MouseEnter:connect(function()
button.Image = localAssetBase .. "CloseButton_dn.png"
end)
button.MouseLeave:connect(function()
button.Image = localAssetBase .. "CloseButton.png"
end)
button.MouseButton1Click:connect(function()
button.ClosedState.Value = true
button.Image = localAssetBase .. "CloseButton.png"
end)
end
-- nice selection animation
function fadeInButton(button)
if currentlySelectedButton ~= nil then
currentlySelectedButton.Selected = false
currentlySelectedButton.ZIndex = 2
currentlySelectedButton.Frame.BackgroundTransparency = 1
end
local speed = 0.1
button.ZIndex = 3
while button.Frame.BackgroundTransparency > 0 do
button.Frame.BackgroundTransparency = button.Frame.BackgroundTransparency - speed
wait()
end
button.Selected = true
currentlySelectedButton = button
selectedButton.Value = currentlySelectedButton
end
------------------------------- create the color selection sub menu -----------------------------------
local paintMenu = Instance.new("ImageLabel")
local paintTool = gui.BuildTools.Frame.PropertyTools.PaintTool
paintMenu.Name = "PaintMenu"
paintMenu.RobloxLocked = true
paintMenu.Parent = paintTool
paintMenu.Position = UDim2.new(-2.7,0,-3,0)
paintMenu.Size = UDim2.new(2.5,0,10,0)
paintMenu.BackgroundTransparency = 1
paintMenu.ZIndex = 2
paintMenu.Image = localAssetBase .. "PaintMenu.png"
local paintColorButton = Instance.new("ImageButton")
paintColorButton.RobloxLocked = true
paintColorButton.BorderSizePixel = 0
paintColorButton.ZIndex = 2
paintColorButton.Size = UDim2.new(0.200000003, 0,0.0500000007, 0)
local selection = Instance.new("Frame")
selection.RobloxLocked = true
selection.BorderSizePixel = 0
selection.BackgroundColor3 = Color3.new(1,1,1)
selection.BackgroundTransparency = 1
selection.ZIndex = 2
selection.Size = UDim2.new(1.1,0,1.1,0)
selection.Position = UDim2.new(-0.05,0,-0.05,0)
selection.Parent = paintColorButton
local header = 0.08
local spacing = 18
local count = 1
function findNextColor()
colorName = tostring(BrickColor.new(count))
while colorName == "Medium stone grey" do
count = count + 1
colorName = tostring(BrickColor.new(count))
end
return count
end
for i = 0,15 do
for j = 1, 4 do
newButton = paintColorButton:clone()
newButton.RobloxLocked = true
newButton.BackgroundColor3 = BrickColor.new(findNextColor()).Color
newButton.Name = tostring(BrickColor.new(count))
count = count + 1
if j == 1 then newButton.Position = UDim2.new(0.08,0,i/spacing + header,0)
elseif j == 2 then newButton.Position = UDim2.new(0.29,0,i/spacing + header,0)
elseif j == 3 then newButton.Position = UDim2.new(0.5,0,i/spacing + header,0)
elseif j == 4 then newButton.Position = UDim2.new(0.71,0,i/spacing + header,0) end
newButton.Parent = paintMenu
end
end
local paintButtons = paintMenu:GetChildren()
for i = 1, #paintButtons do
paintButtons[i].MouseButton1Click:connect(function()
fadeInButton(paintButtons[i])
end)
end
local paintCloseButton = closeButton:clone()
paintCloseButton.RobloxLocked = true
paintCloseButton.Parent = paintMenu
local closedState = Instance.new("BoolValue")
closedState.RobloxLocked = true
closedState.Name = "ClosedState"
closedState.Parent = paintCloseButton
setUpCloseButtonState(paintCloseButton)
------------------------------- create the material selection sub menu -----------------------------------
local materialMenu = Instance.new("ImageLabel")
local materialTool = gui.BuildTools.Frame.PropertyTools.MaterialSelector
materialMenu.RobloxLocked = true
materialMenu.Name = "MaterialMenu"
materialMenu.Position = UDim2.new(-4,0,-3,0)
materialMenu.Size = UDim2.new(2.5,0,6.5,0)
materialMenu.BackgroundTransparency = 1
materialMenu.ZIndex = 2
materialMenu.Image = localAssetBase .. "MaterialMenu.png"
materialMenu.Parent = materialTool
local textures = {"Plastic","Wood","Slate","CorrodedMetal","Ice","Grass","Foil","DiamondPlate","Concrete"}
local materialButtons = {}
local materialButton = Instance.new("ImageButton")
materialButton.RobloxLocked = true
materialButton.BackgroundTransparency = 1
materialButton.Size = UDim2.new(0.400000003, 0,0.16, 0)
materialButton.ZIndex = 2
selection.Parent = materialButton
local current = 1
function getTextureAndName(button)
if current > #textures then
button:remove()
return false
end
button.Image = localAssetBase .. textures[current] .. ".png"
button.Name = textures[current]
current = current + 1
return true
end
local ySpacing = 0.10
local xSpacing = 0.07
for i = 1,5 do
for j = 1,2 do
local button = materialButton:clone()
button.RobloxLocked = true
button.Position = UDim2.new((j -1)/2.2 + xSpacing,0,ySpacing + (i - 1)/5.5,0)
if getTextureAndName(button) then button.Parent = materialMenu else button:remove() end
table.insert(materialButtons,button)
end
end
for i = 1, #materialButtons do
materialButtons[i].MouseButton1Click:connect(function()
fadeInButton(materialButtons[i])
end)
end
local materialCloseButton = closeButton:clone()
materialCloseButton.RobloxLocked = true
materialCloseButton.Size = UDim2.new(0.2,0,0.08,0)
materialCloseButton.Parent = materialMenu
local closedState = Instance.new("BoolValue")
closedState.RobloxLocked = true
closedState.Name = "ClosedState"
closedState.Parent = materialCloseButton
setUpCloseButtonState(materialCloseButton)
------------------------------- create the surface selection sub menu -----------------------------------
local surfaceMenu = Instance.new("ImageLabel")
local surfaceTool = gui.BuildTools.Frame.PropertyTools.InputSelector
surfaceMenu.RobloxLocked = true
surfaceMenu.Name = "SurfaceMenu"
surfaceMenu.Position = UDim2.new(-2.6,0,-4,0)
surfaceMenu.Size = UDim2.new(2.5,0,5.5,0)
surfaceMenu.BackgroundTransparency = 1
surfaceMenu.ZIndex = 2
surfaceMenu.Image = localAssetBase .. "SurfaceMenu.png"
surfaceMenu.Parent = surfaceTool
textures = {"Smooth", "Studs", "Inlets", "Universal", "Glue", "Weld", "Hinge", "Motor"}
current = 1
local surfaceButtons = {}
local surfaceButton = Instance.new("ImageButton")
surfaceButton.RobloxLocked = true
surfaceButton.BackgroundTransparency = 1
surfaceButton.Size = UDim2.new(0.400000003, 0,0.19, 0)
surfaceButton.ZIndex = 2
selection.Parent = surfaceButton
local ySpacing = 0.14
local xSpacing = 0.07
for i = 1,4 do
for j = 1,2 do
local button = surfaceButton:clone()
button.RobloxLocked = true
button.Position = UDim2.new((j -1)/2.2 + xSpacing,0,ySpacing + (i - 1)/4.6,0)
getTextureAndName(button)
button.Parent = surfaceMenu
table.insert(surfaceButtons,button)
end
end
for i = 1, #surfaceButtons do
surfaceButtons[i].MouseButton1Click:connect(function()
fadeInButton(surfaceButtons[i])
end)
end
local surfaceMenuCloseButton = closeButton:clone()
surfaceMenuCloseButton.RobloxLocked = true
surfaceMenuCloseButton.Size = UDim2.new(0.2,0,0.09,0)
surfaceMenuCloseButton.Parent = surfaceMenu
local closedState = Instance.new("BoolValue")
closedState.RobloxLocked = true
closedState.Name = "ClosedState"
closedState.Parent = surfaceMenuCloseButton
setUpCloseButtonState(surfaceMenuCloseButton)
if game.CoreGui.Version >= 2 then
local function setupTweenTransition(button, menu, outXScale, inXScale)
button.Changed:connect(
function(property)
if property ~= "Selected" then
return
end
if button.Selected then
menu:TweenPosition(UDim2.new(inXScale, menu.Position.X.Offset, menu.Position.Y.Scale, menu.Position.Y.Offset),
Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
else
menu:TweenPosition(UDim2.new(outXScale, menu.Position.X.Offset, menu.Position.Y.Scale, menu.Position.Y.Offset),
Enum.EasingDirection.In, Enum.EasingStyle.Quart, 0.5, true)
end
end)
end
setupTweenTransition(paintTool, paintMenu, -2.7, 2.6)
setupTweenTransition(surfaceTool, surfaceMenu, -2.6, 2.6)
setupTweenTransition(materialTool, materialMenu, -4, 1.4)
end

View File

@ -1,122 +1,91 @@
%4% %4%
-- Creates the tool tips for the new gui!
local controlFrame = script.Parent:FindFirstChild("ControlFrame") local controlFrame = script.Parent:FindFirstChild("ControlFrame")
local topLeftControl if not controlFrame then return end
local bottomLeftControl
local bottomRightControl
if controlFrame then local topLeftControl = controlFrame:FindFirstChild("TopLeftControl")
topLeftControl = controlFrame:FindFirstChild("TopLeftControl") local bottomLeftControl = controlFrame:FindFirstChild("BottomLeftControl")
bottomLeftControl = controlFrame:FindFirstChild("BottomLeftControl") local bottomRightControl = controlFrame:FindFirstChild("BottomRightControl")
bottomRightControl = controlFrame:FindFirstChild("BottomRightControl")
else
topLeftControl = script.Parent:FindFirstChild("TopLeftControl")
bottomLeftControl = script.Parent:FindFirstChild("BottomLeftControl")
bottomRightControl = script.Parent:FindFirstChild("BottomRightControl")
end
local frame = Instance.new("TextLabel")
frame.RobloxLocked = true local frameTip = Instance.new("TextLabel")
frame.Name = "ToolTip" frameTip.Name = "ToolTip"
frame.Text = "Hi! I'm a ToolTip!" frameTip.Text = ""
frame.Font = Enum.Font.ArialBold frameTip.Font = Enum.Font.ArialBold
frame.FontSize = Enum.FontSize.Size12 frameTip.FontSize = Enum.FontSize.Size12
frame.TextColor3 = Color3.new(1,1,1) frameTip.TextColor3 = Color3.new(1,1,1)
frame.BorderSizePixel = 0 frameTip.BorderSizePixel = 0
frame.ZIndex = 10 frameTip.ZIndex = 10
frame.Size = UDim2.new(2,0,1,0) frameTip.Size = UDim2.new(2,0,1,0)
frame.Position = UDim2.new(1,0,0,0) frameTip.Position = UDim2.new(1,0,0,0)
frame.BackgroundColor3 = Color3.new(0,0,0) frameTip.BackgroundColor3 = Color3.new(0,0,0)
frame.BackgroundTransparency = 1 frameTip.BackgroundTransparency = 1
frame.TextTransparency = 1 frameTip.TextTransparency = 1
frame.TextWrap = true frameTip.TextWrap = true
local inside = Instance.new("BoolValue") local inside = Instance.new("BoolValue")
inside.RobloxLocked = true
inside.Name = "inside" inside.Name = "inside"
inside.Value = false inside.Value = false
inside.Parent = frame inside.Parent = frameTip
function setUpListeners(frame) function setUpListeners(frameToListen)
local fadeSpeed = 0.1 local fadeSpeed = 0.1
frame.Parent.MouseEnter:connect(function() frameToListen.Parent.MouseEnter:connect(function()
frame.inside.Value = true if frameToListen:FindFirstChild("inside") then
wait(1.2) frameToListen.inside.Value = true
if frame.inside.Value then wait(1.2)
while frame.inside.Value and frame.BackgroundTransparency > 0 do if frameToListen.inside.Value then
frame.BackgroundTransparency = frame.BackgroundTransparency - fadeSpeed while frameToListen.inside.Value and frameToListen.BackgroundTransparency > 0 do
frame.TextTransparency = frame.TextTransparency - fadeSpeed frameToListen.BackgroundTransparency = frameToListen.BackgroundTransparency - fadeSpeed
wait() frameToListen.TextTransparency = frameToListen.TextTransparency - fadeSpeed
wait()
end
end end
end end
end) end)
frame.Parent.MouseLeave:connect(function() function killTip(killFrame)
frame.inside.Value = false killFrame.inside.Value = false
frame.BackgroundTransparency = 1 killFrame.BackgroundTransparency = 1
frame.TextTransparency = 1 killFrame.TextTransparency = 1
end)
frame.Parent.MouseButton1Click:connect(function()
frame.inside.Value = false
frame.BackgroundTransparency = 1
frame.TextTransparency = 1
end)
end
----------------- set up Top Left Tool Tips --------------------------
if topLeftControl then
local topLeftChildren = topLeftControl:GetChildren()
for i = 1, #topLeftChildren do
if topLeftChildren[i].Name == "Help" then
local helpTip = frame:clone()
helpTip.RobloxLocked = true
helpTip.Text = "Help"
helpTip.Parent = topLeftChildren[i]
setUpListeners(helpTip)
end
end end
frameToListen.Parent.MouseLeave:connect(function() killTip(frameToListen) end)
frameToListen.Parent.MouseButton1Click:connect(function() killTip(frameToListen) end)
end end
function createSettingsButtonTip(parent)
if parent == nil then
parent = bottomLeftControl:FindFirstChild("SettingsButton")
end
local toolTip = frameTip:clone()
toolTip.RobloxLocked = true
toolTip.Text = "Settings/Leave Game"
toolTip.Position = UDim2.new(0,0,0,-18)
toolTip.Size = UDim2.new(0,120,0,20)
toolTip.Parent = parent
setUpListeners(toolTip)
end
wait(5) -- make sure we are loaded in, won't need tool tips for first 5 seconds anyway
---------------- set up Bottom Left Tool Tips ------------------------- ---------------- set up Bottom Left Tool Tips -------------------------
local bottomLeftChildren = bottomLeftControl:GetChildren() local bottomLeftChildren = bottomLeftControl:GetChildren()
local hasSettingsTip = false
for i = 1, #bottomLeftChildren do for i = 1, #bottomLeftChildren do
if bottomLeftChildren[i].Name == "Exit" then if bottomLeftChildren[i].Name == "Exit" then
local exitTip = frame:clone() local exitTip = frameTip:clone()
exitTip.RobloxLocked = true exitTip.RobloxLocked = true
exitTip.Text = "Leave Place" exitTip.Text = "Leave Place"
exitTip.Position = UDim2.new(0,0,-1,0) exitTip.Position = UDim2.new(0,0,-1,0)
exitTip.Size = UDim2.new(1,0,1,0) exitTip.Size = UDim2.new(1,0,1,0)
exitTip.Parent = bottomLeftChildren[i] exitTip.Parent = bottomLeftChildren[i]
setUpListeners(exitTip) setUpListeners(exitTip)
elseif bottomLeftChildren[i].Name == "TogglePlayMode" then
local playTip = frame:clone()
playTip.RobloxLocked = true
playTip.Text = "Roblox Studio"
playTip.Position = UDim2.new(0,0,-1,0)
playTip.Parent = bottomLeftChildren[i]
setUpListeners(playTip)
elseif bottomLeftChildren[i].Name == "ToolButton" then
local toolTip = frame:clone()
toolTip.RobloxLocked = true
toolTip.Text = "Build Tools"
toolTip.Position = UDim2.new(0,0,-1,0)
toolTip.Parent = bottomLeftChildren[i]
setUpListeners(toolTip)
elseif bottomLeftChildren[i].Name == "SettingsButton" then elseif bottomLeftChildren[i].Name == "SettingsButton" then
local toolTip = frame:clone() hasSettingsTip = true
toolTip.RobloxLocked = true createSettingsButtonTip(bottomLeftChildren[i])
toolTip.Text = "Settings"
toolTip.Position = UDim2.new(0,0,-1,0)
toolTip.Parent = bottomLeftChildren[i]
setUpListeners(toolTip)
end end
end end
@ -125,32 +94,8 @@ end
local bottomRightChildren = bottomRightControl:GetChildren() local bottomRightChildren = bottomRightControl:GetChildren()
for i = 1, #bottomRightChildren do for i = 1, #bottomRightChildren do
if bottomRightChildren[i].Name:find("Camera") ~= nil then
if bottomRightChildren[i].Name == "ToggleFullScreen" then local cameraTip = frameTip:clone()
local fullScreen = frame:clone()
fullScreen.RobloxLocked = true
fullScreen.Text = "Fullscreen"
fullScreen.Position = UDim2.new(-1,0,-1,0)
fullScreen.Size = UDim2.new(2.4,0,1,0)
fullScreen.Parent = bottomRightChildren[i]
setUpListeners(fullScreen)
elseif bottomRightChildren[i].Name == "ReportAbuse" then
local abuseTip = frame:clone()
abuseTip.RobloxLocked = true
abuseTip.Text = "Report Abuse"
abuseTip.Position = UDim2.new(0,0,-1,0)
abuseTip.Parent = bottomRightChildren[i]
setUpListeners(abuseTip)
elseif bottomRightChildren[i].Name == "Screenshot" then
local shotTip = frame:clone()
shotTip.RobloxLocked = true
shotTip.Text = "Screenshot"
shotTip.Position = UDim2.new(0,0,-1,0)
shotTip.Size = UDim2.new(2.1,0,1,0)
shotTip.Parent = bottomRightChildren[i]
setUpListeners(shotTip)
elseif bottomRightChildren[i].Name:find("Camera") ~= nil then
local cameraTip = frame:clone()
cameraTip.RobloxLocked = true cameraTip.RobloxLocked = true
cameraTip.Text = "Camera View" cameraTip.Text = "Camera View"
if bottomRightChildren[i].Name:find("Zoom") then if bottomRightChildren[i].Name:find("Zoom") then
@ -161,24 +106,5 @@ for i = 1, #bottomRightChildren do
cameraTip.Size = UDim2.new(2,0,1.25,0) cameraTip.Size = UDim2.new(2,0,1.25,0)
cameraTip.Parent = bottomRightChildren[i] cameraTip.Parent = bottomRightChildren[i]
setUpListeners(cameraTip) setUpListeners(cameraTip)
elseif bottomRightChildren[i].Name == "RecordToggle" then
local recordTip = frame:clone()
recordTip.RobloxLocked = true
recordTip.Text = "Take Video"
recordTip.Position = UDim2.new(0,0,-1.1,0)
recordTip.Size = UDim2.new(1,0,1,0)
recordTip.Parent = bottomRightChildren[i]
setUpListeners(recordTip)
elseif bottomRightChildren[i].Name == "Help" then
print("found help in bottom right")
local helpTip = frame:clone()
helpTip.RobloxLocked = true
helpTip.Text = "Help"
helpTip.Position = UDim2.new(-0.5,0,-1,0)
helpTip.Size = UDim2.new(1.5,0,1,0)
helpTip.Parent = bottomRightChildren[i]
setUpListeners(helpTip)
end end
end end

File diff suppressed because it is too large Load Diff

393
public/asset/52177590 Normal file
View File

@ -0,0 +1,393 @@
%52177590%
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Health</string>
<ProtectedString name="Source">function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
-- declarations
local Figure = script.Parent
local Head = waitForChild(Figure, &quot;Head&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
local regening = false
-- regeneration
function regenHealth()
if regening then return end
regening = true
while Humanoid.Health &lt; Humanoid.MaxHealth do
local s = wait(1)
local health = Humanoid.Health
if health &gt; 0 and health &lt; Humanoid.MaxHealth then
local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
health = health + newHealthDelta
Humanoid.Health = math.min(health,Humanoid.MaxHealth)
end
end
if Humanoid.Health &gt; Humanoid.MaxHealth then
Humanoid.Health = Humanoid.MaxHealth
end
regening = false
end
Humanoid.HealthChanged:connect(regenHealth)
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Script" referent="RBX1">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">HealthScript v3.1</string>
<ProtectedString name="Source">local HealthGUI_prototype = script:FindFirstChild(&quot;HealthGUI&quot;)
local lastHealth = 100
local lastHealth2 = 100
local maxWidth = 0.96
local humanoid = script.Parent.Humanoid
if (humanoid == nil) then
print(&quot;ERROR: no humanoid found in &apos;HealthScript v3.1&apos;&quot;)
end
function CreateGUI()
local p = game.Players:GetPlayerFromCharacter(humanoid.Parent)
HealthGUI_prototype.Parent = p.PlayerGui
end
function UpdateGUI(health)
tray = HealthGUI_prototype.tray
local width = (health / humanoid.MaxHealth) * maxWidth
local height = 0.83
local lastX = tray.bar.Position.X.Scale
local x = 0.019 + (maxWidth - width)
local y = 0.1
tray.bar.Position = UDim2.new(x,0,y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
if( (health / humanoid.MaxHealth) &gt; 0.25 ) then
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
else
tray.barRed.Position = tray.bar.Position
tray.barRed.Size = tray.bar.Size
tray.bar.Size = UDim2.new(0, 0, 0, 0)
end
if ( (lastHealth - health) &gt; (humanoid.MaxHealth / 10) ) then
lastHealth = health
if humanoid.Health ~= humanoid.MaxHealth then
delay(0,function()
AnimateHurtOverlay()
end)
delay(0,function()
AnimateBars(x, y, lastX, height)
end)
end
else
lastHealth = health
end
end
function HealthChanged(health)
UpdateGUI(health)
if ( (lastHealth2 - health) &gt; (humanoid.MaxHealth / 10) ) then
lastHealth2 = health
else
lastHealth2 = health
end
end
function AnimateBars(x, y, lastX, height)
tray = HealthGUI_prototype.tray
local width = math.abs(x - lastX)
if( x &gt; lastX ) then
x = lastX
end
tray.bar2.Position = UDim2.new(x,0, y, 0)
tray.bar2.Size = UDim2.new(width, 0, height, 0)
tray.bar2.BackgroundTransparency = 0
local GBchannels = 1
local j = 0.2
local i_total = 30
for i=1,i_total do
-- Increment Values
if (GBchannels &lt; 0.2) then
j = -j
end
GBchannels = GBchannels + j
if (i &gt; (i_total - 10)) then
tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
end
tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
wait(0.02)
end
end
function AnimateHurtOverlay()
-- Start:
-- overlay.Position = UDim2.new(0, 0, 0, -22)
-- overlay.Size = UDim2.new(1, 0, 1.15, 30)
-- Finish:
-- overlay.Position = UDim2.new(-2, 0, -2, -22)
-- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
overlay = HealthGUI_prototype.hurtOverlay
overlay.Position = UDim2.new(-2, 0, -2, -22)
overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
-- Animate In, fast
local i_total = 2
local wiggle_total = 0
local wiggle_i = 0.02
for i=1,i_total do
overlay.Position = UDim2.new( (-2 + (2 * (i/i_total)) + wiggle_total/2), 0, (-2 + (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
i_total = 30
wait(0.03)
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) &gt; (wiggle_i * 3) ) then
wiggle_i = -wiggle_i
end
wiggle_total = wiggle_total + wiggle_i
overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Hide after we&apos;re done
overlay.Position = UDim2.new(10, 0, 0, 0)
end
CreateGUI()
humanoid.HealthChanged:connect(HealthChanged)
humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
<Item class="GuiMain" referent="RBX2">
<Properties>
<string name="Name">HealthGUI</string>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4290164919</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>rbxasset://Textures/34854607</url></Content>
<string name="Name">hurtOverlay</string>
<UDim2 name="Position">
<XS>2</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-22</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1.1500001</YS>
<YO>30</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX4">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4285215356</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<string name="Name">tray</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-44</XO>
<YS>1</YS>
<YO>-26</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>170</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">2</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX5">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>rbxasset://Textures/35238000</url></Content>
<string name="Name">bkg</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX6">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>rbxasset://Textures/35238036</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX7">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1.00000012</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="Draggable">false</bool>
<string name="Name">bar2</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.192000002</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX8">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>rbxasset://Textures/35238053</url></Content>
<string name="Name">bar</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.959999979</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX9">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>rbxasset://Textures/34816363</url></Content>
<string name="Name">label</string>
<UDim2 name="Position">
<XS>0.680000007</XS>
<XO>0</XO>
<YS>0.300000012</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.25</XS>
<XO>0</XO>
<YS>0.349999994</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
</Item>
</Item>
</roblox>

View File

@ -465,42 +465,54 @@ function removeDialog(dialog)
end end
function addDialog(dialog) function addDialog(dialog)
if dialog.Parent and dialog.Parent:IsA("BasePart") then if dialog.Parent then
local chatGui = chatNotificationGui:clone() if dialog.Parent:IsA("BasePart") then
chatGui.Enabled = not dialog.InUse local chatGui = chatNotificationGui:clone()
chatGui.Adornee = dialog.Parent chatGui.Enabled = not dialog.InUse
chatGui.RobloxLocked = true chatGui.Adornee = dialog.Parent
chatGui.Parent = game.CoreGui chatGui.RobloxLocked = true
chatGui.Image.Button.MouseButton1Click:connect(function() startDialog(dialog) end) chatGui.Parent = game.CoreGui
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone) chatGui.Image.Button.MouseButton1Click:connect(function() startDialog(dialog) end)
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
dialogMap[dialog] = chatGui dialogMap[dialog] = chatGui
dialogConnections[dialog] = dialog.Changed:connect(function(prop) dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then if prop == "Parent" and dialog.Parent then
--This handles the reparenting case, seperate from removal case --This handles the reparenting case, seperate from removal case
removeDialog(dialog) removeDialog(dialog)
addDialog(dialog) addDialog(dialog)
elseif prop == "InUse" then elseif prop == "InUse" then
chatGui.Enabled = not currentConversationDialog and not dialog.InUse chatGui.Enabled = not currentConversationDialog and not dialog.InUse
if dialog == currentConversationDialog then if dialog == currentConversationDialog then
timeoutDialog() timeoutDialog()
end end
elseif prop == "Tone" or prop == "Purpose" then elseif prop == "Tone" or prop == "Purpose" then
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone) setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
end end
end) end)
else -- still need to listen to parent changes even if current parent is not a BasePart
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
--This handles the reparenting case, seperate from removal case
removeDialog(dialog)
addDialog(dialog)
end
end)
end
end end
end end
function fetchScripts() function fetchScripts()
--print("InsertService")
local model = game:GetService("InsertService"):LoadAsset(39226062) local model = game:GetService("InsertService"):LoadAsset(39226062)
--print(model) if type(model) == "string" then -- load failed, lets try again
while type(model) == "string" do wait(0.1)
--print("Trying again to fetch Scripts")
model = game:GetService("InsertService"):LoadAsset(39226062) model = game:GetService("InsertService"):LoadAsset(39226062)
end end
if type(model) == "string" then -- not going to work, lets bail
return
end
waitForChild(model,"TimeoutScript") waitForChild(model,"TimeoutScript")
timeoutScript = model.TimeoutScript timeoutScript = model.TimeoutScript
waitForChild(model,"ReenableDialogScript") waitForChild(model,"ReenableDialogScript")

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +1,215 @@
%8% %8%
--build our gui function waitForProperty(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local popupFrame = Instance.new("Frame") waitForProperty(game.Players,"LocalPlayer")
popupFrame.Position = UDim2.new(0.5,-165,0.5,-175) waitForChild(script.Parent,"Popup")
popupFrame.Size = UDim2.new(0,330,0,350) waitForChild(script.Parent.Popup,"AcceptButton")
popupFrame.Style = Enum.FrameStyle.RobloxRound script.Parent.Popup.AcceptButton.Modal = true
popupFrame.ZIndex = 4
popupFrame.Name = "Popup"
popupFrame.Visible = false
popupFrame.Parent = script.Parent
local darken = popupFrame:clone() local localPlayer = game.Players.LocalPlayer
darken.Size = UDim2.new(1,16,1,16) local acceptedTeleport = Instance.new("IntValue")
darken.Position = UDim2.new(0,-8,0,-8)
darken.Name = "Darken"
darken.ZIndex = 1
darken.Parent = popupFrame
local acceptButton = Instance.new("TextButton") local friendRequestBlacklist = {}
acceptButton.Position = UDim2.new(0,20,0,270)
acceptButton.Size = UDim2.new(0,100,0,50)
acceptButton.Font = Enum.Font.ArialBold
acceptButton.FontSize = Enum.FontSize.Size24
acceptButton.Style = Enum.ButtonStyle.RobloxButton
acceptButton.TextColor3 = Color3.new(248/255,248/255,248/255)
acceptButton.Text = "Yes"
acceptButton.ZIndex = 5
acceptButton.Name = "AcceptButton"
acceptButton.Parent = popupFrame
local declineButton = acceptButton:clone() local teleportEnabled = true
declineButton.Position = UDim2.new(1,-120,0,270)
declineButton.Text = "No"
declineButton.Name = "DeclineButton"
declineButton.Parent = popupFrame
local popupImage = Instance.new("ImageLabel") local makePopupInvisible = function()
popupImage.BackgroundTransparency = 1 if script.Parent.Popup then script.Parent.Popup.Visible = false end
popupImage.Position = UDim2.new(0.5,-140,0,0) end
popupImage.Size = UDim2.new(0,280,0,280)
popupImage.ZIndex = 3
popupImage.Name = "PopupImage"
popupImage.Parent = popupFrame
local backing = Instance.new("ImageLabel") function makeFriend(fromPlayer,toPlayer)
backing.BackgroundTransparency = 1
backing.Size = UDim2.new(1,0,1,0)
backing.Image = "http://www.youtube.pengin.xyz/asset/?id=47574181"
backing.Name = "Backing"
backing.ZIndex = 2
backing.Parent = popupImage
local popupText = Instance.new("TextLabel") local popup = script.Parent:FindFirstChild("Popup")
popupText.Name = "PopupText" if popup == nil then return end -- there is no popup!
popupText.Size = UDim2.new(1,0,0.8,0) if popup.Visible then return end -- currently popping something, abort!
popupText.Font = Enum.Font.ArialBold if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
popupText.FontSize = Enum.FontSize.Size36
popupText.BackgroundTransparency = 1
popupText.Text = "Hello I'm a popup"
popupText.TextColor3 = Color3.new(248/255,248/255,248/255)
popupText.TextWrap = true
popupText.ZIndex = 5
popupText.Parent = popupFrame
script:remove() popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=352&y=352"
showTwoButtons()
popup.Visible = true
popup.AcceptButton.Text = "Accept"
popup.DeclineButton.Text = "Decline"
popup:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)
local yesCon, noCon
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RequestFriendship(fromPlayer)
if yesCon then yesCon:disconnect() end
if noCon then noCon:disconnect() end
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RevokeFriendship(fromPlayer)
friendRequestBlacklist[fromPlayer] = true
print("pop up blacklist")
if yesCon then yesCon:disconnect() end
if noCon then noCon:disconnect() end
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
end
game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
-- if this doesn't involve me, then do nothing
if fromPlayer ~= localPlayer and toPlayer ~= localPlayer then return end
if fromPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification("You are Friends",
"With " .. toPlayer.Name .. "!",
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(toPlayer.userId).."&x=48&y=48",
5,
function()
end)
end
elseif toPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Issue then
if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
game:GetService("GuiService"):SendNotification("Friend Request",
"From " .. fromPlayer.Name,
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
8,
function()
makeFriend(fromPlayer,toPlayer)
end)
elseif event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification("You are Friends",
"With " .. fromPlayer.Name .. "!",
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
5,
function()
end)
end
end
end)
function showOneButton()
local popup = script.Parent:FindFirstChild("Popup")
if popup then
popup.OKButton.Visible = true
popup.DeclineButton.Visible = false
popup.AcceptButton.Visible = false
end
end
function showTwoButtons()
local popup = script.Parent:FindFirstChild("Popup")
if popup then
popup.OKButton.Visible = false
popup.DeclineButton.Visible = true
popup.AcceptButton.Visible = true
end
end
if teleportEnabled then
game:GetService("TeleportService").ErrorCallback = function(message)
local popup = script.Parent:FindFirstChild("Popup")
showOneButton()
popup.PopupText.Text = message
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
if clickCon then clickCon:disconnect() end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup"), Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)
end,
--HideFunction
function()
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
end
game:GetService("TeleportService").ConfirmationCallback = function(message, placeId, spawnName)
local popup = script.Parent:FindFirstChild("Popup")
popup.PopupText.Text = message
popup.PopupImage.Image = ""
local yesCon, noCon
local function killCons()
if yesCon then yesCon:disconnect() end
if noCon then noCon:disconnect() end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
killCons()
local success, err = pcall(function() game:GetService("TeleportService"):TeleportImpl(placeId,spawnName) end)
if not success then
showOneButton()
popup.PopupText.Text = err
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
if clickCon then clickCon:disconnect() end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup"), Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)
end,
--HideFunction
function()
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
end
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
killCons()
local success = pcall(function() game:GetService("TeleportService"):TeleportCancel() end)
end)
local centerDialogSuccess = pcall(function() game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup"), Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showTwoButtons()
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)
end,
--HideFunction
function()
popup:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,makePopupInvisible())
end)
end)
if centerDialogSuccess == false then
script.Parent:FindFirstChild("Popup").Visible = true
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)
end
return true
end
end

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ ob_start();
function sign($data) { function sign($data) {
$PrivKey = file_get_contents("./PrivKey.pem"); $PrivKey = file_get_contents("./PrivKey.pem");
openssl_sign($data, $signature, $PrivKey, OPENSSL_ALGO_SHA1); openssl_sign($data, $signature, $PrivKey, OPENSSL_ALGO_SHA1);
echo sprintf("%%%s%%%s", base64_encode($signature), $data); echo "" . sprintf("%%%s%%%s", base64_encode($signature), $data);
} }
$id = (int)($_GET["id"] ?? die(json_encode(["message" => "Error handling your request."]))); $id = (int)($_GET["id"] ?? die(json_encode(["message" => "Error handling your request."])));
@ -45,6 +45,18 @@ if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/asset/" . $id)){
sign($file); sign($file);
}else if($id == 15){ }else if($id == 15){
sign($file); sign($file);
}else if($id == 16){
sign($file);
}else if($id == 17){
sign($file);
}else if($id == 18){
sign($file);
}else if($id == 19){
sign($file);
}else if($id == 20){
sign($file);
}else if($id == 52177590){
sign($file);
}else{ }else{
echo $file; echo $file;
} }