Port more corescripts to yuescript lmao

This commit is contained in:
Lewin Kelly 2023-04-15 23:08:26 +01:00
parent 1642c4c716
commit d665d3afdf
15 changed files with 995 additions and 307 deletions

245
yue/152908679.lua Normal file
View File

@ -0,0 +1,245 @@
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local contextActionService = Game:GetService("ContextActionService")
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
local functionTable = { }
local buttonVector = { }
local buttonScreenGui
local buttonFrame
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
local oldTouches = { }
local buttonPositionTable = {
UDim2.new(0, 123, 0, 70),
UDim2.new(0, 30, 0, 60),
UDim2.new(0, 180, 0, 160),
UDim2.new(0, 85, 0, -25),
UDim2.new(0, 185, 0, -25),
UDim2.new(0, 185, 0, 260),
UDim2.new(0, 216, 0, 65)
}
local maxButtons = #buttonPositionTable
do
local _with_0 = Game:GetService("ContentProvider")
_with_0:Preload(ContextDownImage)
_with_0:Preload(ContextUpImage)
end
while not Game.Players do
wait()
end
while not Game.Players.LocalPlayer do
wait()
end
local createContextActionGui
createContextActionGui = function()
if not buttonScreenGui and isTouchDevice then
buttonScreenGui = New("ScreenGui", "ContextActionGui", {
New("Frame", "ContextButtonFrame", {
BackgroundTransparency = 1,
Size = UDim2.new(0.3, 0, 0.5, 0),
Position = UDim2.new(0.7, 0, 0.5, 0)
})
})
end
end
local contextButtonDown
contextButtonDown = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Begin)
end
end
local contextButtonMoved
contextButtonMoved = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Change)
end
end
local contextButtonUp
contextButtonUp = function(button, inputObject, actionName)
button.Image = ContextUpImage
if inputObject.UserInputType == Enum.UserInputType.Touch and inputObject.UserInputState == Enum.UserInputState.End then
return contextActionService:CallFunction(actionName, Enum.UserInputState.End, inputObject)
end
end
local isSmallScreenDevice
isSmallScreenDevice = function()
return Game:GetService("GuiService"):GetScreenResolution().y <= 320
end
local createNewButton
createNewButton = function(actionName, functionInfoTable)
local contextButton = New("ImageButton", "ContextActionButton", {
BackgroundTransparency = 1,
Size = UDim2.new((function()
if isSmallScreenDevice() then
return 0, 90, 0, 90
else
return 0, 70, 0, 70
end
end)()),
Active = true,
Image = ContextUpImage,
Parent = buttonFrame
})
local currentButtonTouch
Game:GetService("UserInputService").InputEnded:connect(function(inputObject)
oldTouches[inputObject] = nil
end)
contextButton.InputBegan:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if inputObject.UserInputState == Enum.UserInputState.Begin and not (currentButtonTouch ~= nil) then
currentButtonTouch = inputObject
return contextButtonDown(contextButton, inputObject, actionName)
end
end)
contextButton.InputChanged:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
return contextButtonMoved(contextButton, inputObject, actionName)
end)
contextButton.InputEnded:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
currentButtonTouch = nil
oldTouches[inputObject] = true
return contextButtonUp(contextButton, inputObject, actionName)
end)
local actionIcon = New("ImageLabel", "ActionIcon", {
Position = UDim2.new(0.175, 0, 0.175, 0),
Size = UDim2.new(0.65, 0, 0.65, 0),
BackgroundTransparency = 1
})
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string" then
actionIcon.Image = functionInfoTable["image"]
end
actionIcon.Parent = contextButton
local actionTitle = New("TextLabel", "ActionTitle", {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Font = Enum.Font.SourceSansBold,
TextColor3 = Color3.new(1, 1, 1),
TextStrokeTransparency = 0,
FontSize = Enum.FontSize.Size18,
TextWrapped = true,
Text = ""
})
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string" then
actionTitle.Text = functionInfoTable["title"]
end
actionTitle.Parent = contextButton
return contextButton
end
local createButton
createButton = function(actionName, functionInfoTable)
local button = createNewButton(actionName, functionInfoTable)
local position
for i = 1, #buttonVector do
if buttonVector[i] == "empty" then
position = i
break
end
end
if not position then
position = #buttonVector + 1
end
if position > maxButtons then
return
end
buttonVector[position] = button
functionTable[actionName]["button"] = button
button.Position = buttonPositionTable[position]
button.Parent = buttonFrame
if buttonScreenGui and not (buttonScreenGui.Parent ~= nil) then
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
end
end
local removeAction
removeAction = function(actionName)
if not functionTable[actionName] then
return
end
local actionButton = functionTable[actionName]["button"]
if actionButton then
actionButton.Parent = nil
for i = 1, #buttonVector do
if buttonVector[i] == actionButton then
buttonVector[i] = "empty"
break
end
end
actionButton:Destroy()
end
functionTable[actionName] = nil
end
local addAction
addAction = function(actionName, createTouchButton, functionInfoTable)
if functionTable[actionName] then
removeAction(actionName)
end
functionTable[actionName] = {
functionInfoTable
}
if createTouchButton and isTouchDevice then
createContextActionGui()
return createButton(actionName, functionInfoTable)
end
end
contextActionService.BoundActionChanged:connect(function(actionName, changeName, changeTable)
if functionTable[actionName] and changeTable then
do
local button = functionTable[actionName]["button"]
if button then
if changeName == "image" then
button.ActionIcon.Image = changeTable[changeName]
elseif changeName == "title" then
button.ActionTitle.Text = changeTable[changeName]
elseif changeName == "position" then
button.Position = changeTable[changeName]
end
end
end
end
end)
contextActionService.BoundActionAdded:connect(function(actionName, createTouchButton, functionInfoTable)
return addAction(actionName, createTouchButton, functionInfoTable)
end)
contextActionService.BoundActionRemoved:connect(function(actionName, _)
return removeAction(actionName)
end)
contextActionService.GetActionButtonEvent:connect(function(actionName)
if functionTable[actionName] then
return contextActionService:FireActionButtonFoundSignal(actionName, functionTable[actionName]["button"])
end
end)
local boundActions = contextActionService:GetAllBoundActionInfo()
for actionName, actionData in pairs(boundActions) do
addAction(actionName, actionData["createTouchButton"], actionData)
end

View File

@ -0,0 +1,244 @@
-- ContextActionTouch.lua
-- Created by Ben Tkacheff
-- this script controls ui and firing of lua functions that are bound in ContextActionService for touch inputs
-- Essentially a user can bind a lua function to a key code, input type (mousebutton1 etc.) and this
-- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) ->
if not props? -- no name was provided
props = name
name = nil
obj = Instance.new className
obj.Name = name if name
local parent
for k, v in pairs props
if type(k) == "string"
if k == "Parent"
parent = v
else
obj[k] = v
elseif type(k) == "number" and type(v) == "userdata"
v.Parent = obj
obj.Parent = parent
obj
--
-- Variables
contextActionService = Game\GetService "ContextActionService"
isTouchDevice = Game\GetService("UserInputService").TouchEnabled
functionTable = {}
buttonVector = {}
local buttonScreenGui
local buttonFrame
ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
oldTouches = {}
buttonPositionTable =
* UDim2.new 0, 123, 0, 70
* UDim2.new 0, 30, 0, 60
* UDim2.new 0, 180, 0, 160
* UDim2.new 0, 85, 0, -25
* UDim2.new 0, 185, 0, -25
* UDim2.new 0, 185, 0, 260
* UDim2.new 0, 216, 0, 65
maxButtons = #buttonPositionTable
-- Preload images
with Game\GetService"ContentProvider"
\Preload ContextDownImage
\Preload ContextUpImage
wait! until Game.Players
wait! until Game.Players.LocalPlayer
createContextActionGui = ->
if not buttonScreenGui and isTouchDevice
buttonScreenGui = New "ScreenGui", "ContextActionGui"
* New "Frame", "ContextButtonFrame"
BackgroundTransparency: 1
Size: UDim2.new 0.3, 0, 0.5, 0
Position: UDim2.new 0.7, 0, 0.5, 0
-- functions
-- setButtonSizeAndPosition = (object) ->
-- buttonSize = 55
-- xOffset = 10
-- yOffset = 95
-- -- todo: better way to determine mobile sized screens
-- onSmallScreen = game.CoreGui.RobloxGui.AbsoluteSize.X < 600
-- if not onSmallScreen
-- buttonSize = 85
-- xOffset = 40
-- object.Size = UDim2.new 0, buttonSize, 0, buttonSize
contextButtonDown = (button, inputObject, actionName) ->
if inputObject.UserInputType == Enum.UserInputType.Touch
button.Image = ContextDownImage
contextActionService\CallFunction actionName, Enum.UserInputState.Begin
contextButtonMoved = (button, inputObject, actionName) ->
if inputObject.UserInputType == Enum.UserInputType.Touch
button.Image = ContextDownImage
contextActionService\CallFunction actionName, Enum.UserInputState.Change
contextButtonUp = (button, inputObject, actionName) ->
button.Image = ContextUpImage
if inputObject.UserInputType == Enum.UserInputType.Touch and
inputObject.UserInputState == Enum.UserInputState.End
contextActionService\CallFunction actionName, Enum.UserInputState.End, inputObject
isSmallScreenDevice = ->
Game\GetService("GuiService")\GetScreenResolution!.y <= 320
createNewButton = (actionName, functionInfoTable) ->
contextButton = New "ImageButton", "ContextActionButton"
BackgroundTransparency: 1
Size: UDim2.new if isSmallScreenDevice!
0, 90, 0, 90
else
0, 70, 0, 70
Active: true
Image: ContextUpImage
Parent: buttonFrame
local currentButtonTouch
Game\GetService("UserInputService").InputEnded\connect (inputObject) ->
oldTouches[inputObject] = nil
contextButton.InputBegan\connect (inputObject) ->
return if oldTouches[inputObject]
if inputObject.UserInputState == Enum.UserInputState.Begin and not currentButtonTouch?
currentButtonTouch = inputObject
contextButtonDown(contextButton, inputObject, actionName)
contextButton.InputChanged\connect (inputObject) ->
return if oldTouches[inputObject] or
currentButtonTouch ~= inputObject
contextButtonMoved(contextButton, inputObject, actionName)
contextButton.InputEnded\connect (inputObject) ->
return if oldTouches[inputObject] or
currentButtonTouch ~= inputObject
currentButtonTouch = nil
oldTouches[inputObject] = true
contextButtonUp(contextButton, inputObject, actionName)
actionIcon = New "ImageLabel", "ActionIcon"
Position: UDim2.new 0.175, 0, 0.175, 0
Size: UDim2.new 0.65, 0, 0.65, 0
BackgroundTransparency: 1
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string"
actionIcon.Image = functionInfoTable["image"]
actionIcon.Parent = contextButton
actionTitle = New "TextLabel", "ActionTitle"
Size: UDim2.new 1, 0, 1, 0
BackgroundTransparency: 1
Font: Enum.Font.SourceSansBold
TextColor3: Color3.new 1, 1, 1
TextStrokeTransparency: 0
FontSize: Enum.FontSize.Size18
TextWrapped: true
Text: ""
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string"
actionTitle.Text = functionInfoTable["title"]
actionTitle.Parent = contextButton
contextButton
createButton = (actionName, functionInfoTable) ->
button = createNewButton(actionName, functionInfoTable)
local position
for i = 1, #buttonVector do
if buttonVector[i] == "empty" then
position = i
break
if not position
position = #buttonVector + 1
-- todo: let user know we have too many buttons already?
return if position > maxButtons
buttonVector[position] = button
functionTable[actionName]["button"] = button
button.Position = buttonPositionTable[position]
button.Parent = buttonFrame
if buttonScreenGui and not buttonScreenGui.Parent? then
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
removeAction = (actionName) ->
return if not functionTable[actionName]
actionButton = functionTable[actionName]["button"]
if actionButton
actionButton.Parent = nil
for i = 1, #buttonVector
if buttonVector[i] == actionButton
buttonVector[i] = "empty"
break
actionButton\Destroy!
functionTable[actionName] = nil
addAction = (actionName, createTouchButton, functionInfoTable) ->
if functionTable[actionName]
removeAction actionName
functionTable[actionName] = { functionInfoTable }
if createTouchButton and isTouchDevice
createContextActionGui!
createButton actionName, functionInfoTable
-- Connections
contextActionService.BoundActionChanged\connect (actionName, changeName, changeTable) ->
if functionTable[actionName] and changeTable
if button = functionTable[actionName]["button"]
if changeName == "image"
button.ActionIcon.Image = changeTable[changeName]
elseif changeName == "title"
button.ActionTitle.Text = changeTable[changeName]
-- elseif changeName == "description"
-- -- todo: add description to menu
elseif changeName == "position"
button.Position = changeTable[changeName]
contextActionService.BoundActionAdded\connect (actionName, createTouchButton, functionInfoTable) ->
addAction actionName, createTouchButton, functionInfoTable
contextActionService.BoundActionRemoved\connect (actionName, _) ->
removeAction actionName
contextActionService.GetActionButtonEvent\connect (actionName) ->
if functionTable[actionName]
contextActionService\FireActionButtonFoundSignal actionName, functionTable[actionName]["button"]
-- make sure any bound data before we setup connections is handled
boundActions = contextActionService\GetAllBoundActionInfo!
for actionName, actionData in pairs boundActions
addAction actionName, actionData["createTouchButton"], actionData

View File

@ -12,11 +12,11 @@ try
scriptContext\AddCoreScript 60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration" scriptContext\AddCoreScript 60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration"
waitForChild = (instance, name) -> waitForChild = (instance, name) ->
while not instance\FindFirstChild name until instance\FindFirstChild name
instance.ChildAdded\wait! instance.ChildAdded\wait!
-- waitForProperty = (instance, property) -> -- waitForProperty = (instance, property) ->
-- while not instance[property] -- until instance[property]
-- instance.Changed\wait! -- instance.Changed\wait!
-- Responsible for tracking logging items -- Responsible for tracking logging items

View File

@ -47,16 +47,16 @@ inCharTag.Name = "InCharTag"
local hider = Instance.new("BoolValue") local hider = Instance.new("BoolValue")
hider.Name = "RobloxBuildTool" hider.Name = "RobloxBuildTool"
if not (config ~= nil) then if not (config ~= nil) then
config = Instance.new("Configuration") config = New("Configuration", "PlayerStats", {
config.Parent = Figure Parent = Figure
config.Name = "PlayerStats" })
end end
local myHealth = config:FindFirstChild("MaxHealth") local myHealth = config:FindFirstChild("MaxHealth")
if not (myHealth ~= nil) then if not (myHealth ~= nil) then
myHealth = Instance.new("NumberValue") myHealth = New("NumberValue", "MaxHealth", {
myHealth.Parent = config Value = 100,
myHealth.Value = 100 Parent = config
myHealth.Name = "MaxHealth" })
end end
Humanoid.MaxHealth = myHealth.Value Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value Humanoid.Health = myHealth.Value

View File

@ -49,16 +49,14 @@ hider = Instance.new "BoolValue"
hider.Name = "RobloxBuildTool" hider.Name = "RobloxBuildTool"
if not config? if not config?
config = Instance.new "Configuration" config = New "Configuration", "PlayerStats"
config.Parent = Figure Parent: Figure
config.Name = "PlayerStats"
myHealth = config\FindFirstChild "MaxHealth" myHealth = config\FindFirstChild "MaxHealth"
if not myHealth? if not myHealth?
myHealth = Instance.new "NumberValue" myHealth = New "NumberValue", "MaxHealth"
myHealth.Parent = config Value: 100
myHealth.Value = 100 Parent: config
myHealth.Name = "MaxHealth"
Humanoid.MaxHealth = myHealth.Value Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value Humanoid.Health = myHealth.Value
@ -136,42 +134,42 @@ while true
ice = config\FindFirstChild "Ice" ice = config\FindFirstChild "Ice"
fire = config\FindFirstChild "Fire" fire = config\FindFirstChild "Fire"
stun = config\FindFirstChild "Stun" stun = config\FindFirstChild "Stun"
if regen with regen do if regen
delta = delta + regen.Value.X delta += .Value.X
if regen.Value.Y >= 0 if .Value.Y >= 0
regen.Value = Vector3.new regen.Value.X + regen.Value.Z, regen.Value.Y - s, regen.Value.Z -- maybe have 3rd parameter be an increaser/decreaser? .Value = Vector3.new .Value.X + .Value.Z, .Value.Y - s, .Value.Z -- maybe have 3rd parameter be an increaser/decreaser?
elseif regen.Value.Y == -1 elseif .Value.Y == -1
regen.Value = Vector3.new regen.Value.X + regen.Value.Z, -1, regen.Value.Z .Value = Vector3.new .Value.X + .Value.Z, -1, .Value.Z
else else
regen\remove! \remove!
-- infinity is -1 -- infinity is -1
if poison with poison do if poison
delta = delta - poison.Value.X delta -= .Value.X
if poison.Value.Y >= 0 if .Value.Y >= 0
poison.Value = Vector3.new poison.Value.X + poison.Value.Z, poison.Value.Y - s, poison.Value.Z .Value = Vector3.new .Value.X + .Value.Z, .Value.Y - s, .Value.Z
elseif poison.Value.Y == -1 elseif .Value.Y == -1
poison.Value = Vector3.new poison.Value.X + poison.Value.Z, -1, poison.Value.Z .Value = Vector3.new .Value.X + .Value.Z, -1, .Value.Z
else else
poison\remove! \remove!
-- infinity is -1 -- infinity is -1
if ice with ice do if ice
--print "IN ICE" --print "IN ICE"
delta = delta - ice.Value.X delta -= .Value.X
if ice.Value.Y >= 0 if .Value.Y >= 0
ice.Value = Vector3.new ice.Value.X, ice.Value.Y - s, ice.Value.Z .Value = Vector3.new .Value.X, .Value.Y - s, .Value.Z
else else
ice\remove! \remove!
if fire with fire do if fire
fireEffect.Enabled = true fireEffect.Enabled = true
fireEffect.Parent = Figure.Torso fireEffect.Parent = Figure.Torso
delta = delta - fire.Value.X delta -= .Value.X
if fire.Value.Y >= 0 if .Value.Y >= 0
fire.Value = Vector3.new fire.Value.X, fire.Value.Y - s, fire.Value.Z .Value = Vector3.new .Value.X, .Value.Y - s, .Value.Z
else else
fire\remove! \remove!
fireEffect.Enabled = false fireEffect.Enabled = false
fireEffect.Parent = nil fireEffect.Parent = nil
@ -184,8 +182,8 @@ while true
for i = 1, #currentChildren for i = 1, #currentChildren
if currentChildren[i].className == "Tool" if currentChildren[i].className == "Tool"
inCharTag\Clone!.Parent = currentChildren[i] inCharTag\Clone!.Parent = currentChildren[i]
print(backpackTools) print backpackTools
table.insert(backpackTools, currentChildren[i]) table.insert backpackTools, currentChildren[i]
for i = 1, #backpackTools for i = 1, #backpackTools
if not backpackTools[i]\FindFirstChild("RobloxBuildTool")? if not backpackTools[i]\FindFirstChild("RobloxBuildTool")?
@ -218,7 +216,7 @@ while true
stun\Remove! stun\Remove!
if delta ~= 0 if delta ~= 0
coroutine.resume(coroutine.create(billboardHealthChange), delta) coroutine.resume coroutine.create(billboardHealthChange), delta
--delta *= .01 --delta *= .01
--health += delta * s * Humanoid.MaxHealth --health += delta * s * Humanoid.MaxHealth

View File

@ -162,19 +162,18 @@ setChatNotificationTone = function(gui, purpose, tone)
end end
local createMessageDialog local createMessageDialog
createMessageDialog = function() createMessageDialog = function()
messageDialog = Instance.new("Frame") messageDialog = New("Frame", "DialogScriptMessage", {
messageDialog.Name = "DialogScriptMessage" Style = Enum.FrameStyle.RobloxRound,
messageDialog.Style = Enum.FrameStyle.RobloxRound Visible = false,
messageDialog.Visible = false New("TextLabel", "Text", {
local text = Instance.new("TextLabel") Position = UDim2.new(0, 0, 0, -1),
text.Name = "Text" Size = UDim2.new(1, 0, 1, 0),
text.Position = UDim2.new(0, 0, 0, -1) FontSize = Enum.FontSize.Size14,
text.Size = UDim2.new(1, 0, 1, 0) BackgroundTransparency = 1,
text.FontSize = Enum.FontSize.Size14 TextColor3 = Color3.new(1, 1, 1),
text.BackgroundTransparency = 1 RobloxLocked = true
text.TextColor3 = Color3.new(1, 1, 1) })
text.RobloxLocked = true })
text.Parent = messageDialog
end end
local showMessage local showMessage
showMessage = function(msg, size) showMessage = function(msg, size)
@ -184,6 +183,7 @@ showMessage = function(msg, size)
messageDialog.Visible = true messageDialog.Visible = true
wait(2) wait(2)
messageDialog.Visible = false messageDialog.Visible = false
return messageDialog
end end
local variableDelay local variableDelay
variableDelay = function(str) variableDelay = function(str)
@ -261,6 +261,7 @@ renewKillswitch = function(dialog)
currentAbortDialogScript.archivable = false currentAbortDialogScript.archivable = false
currentAbortDialogScript.Disabled = false currentAbortDialogScript.Disabled = false
currentAbortDialogScript.Parent = dialog currentAbortDialogScript.Parent = dialog
return currentAbortDialogScript
end end
local presentDialogChoices local presentDialogChoices
presentDialogChoices = function(talkingPart, dialogChoices) presentDialogChoices = function(talkingPart, dialogChoices)
@ -326,11 +327,35 @@ selectChoice = function(choice)
end end
local newChoice local newChoice
newChoice = function(numberText) newChoice = function(numberText)
local frame = Instance.new("TextButton") local frame = New("TextButton", {
frame.BackgroundColor3 = Color3.new(0, 0, 179 / 255) BackgroundColor3 = Color3.new(0, 0, 179 / 255),
frame.AutoButtonColor = false AutoButtonColor = false,
frame.BorderSizePixel = 0 BorderSizePixel = 0,
frame.Text = "" Text = "",
RobloxLocked = true,
New("TextLabel", "Number", {
TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255),
Text = numberText,
FontSize = Enum.FontSize.Size14,
BackgroundTransparency = 1,
Position = UDim2.new(0, 4, 0, 2),
Size = UDim2.new(0, 20, 0, 24),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
RobloxLocked = true
}),
New("TextLabel", "UserPrompt", {
BackgroundTransparency = 1,
TextColor3 = Color3.new(1, 1, 1),
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, 28, 0, 2),
Size = UDim2.new(1, -32, 1, -4),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
TextWrap = true,
RobloxLocked = true
})
})
frame.MouseEnter:connect(function() frame.MouseEnter:connect(function()
return highlightColor(frame, currentTone()) return highlightColor(frame, currentTone())
end) end)
@ -340,31 +365,6 @@ newChoice = function(numberText)
frame.MouseButton1Click:connect(function() frame.MouseButton1Click:connect(function()
return selectChoice(frame) return selectChoice(frame)
end) end)
frame.RobloxLocked = true
local number = Instance.new("TextLabel")
number.Name = "Number"
number.TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255)
number.Text = numberText
number.FontSize = Enum.FontSize.Size14
number.BackgroundTransparency = 1
number.Position = UDim2.new(0, 4, 0, 2)
number.Size = UDim2.new(0, 20, 0, 24)
number.TextXAlignment = Enum.TextXAlignment.Left
number.TextYAlignment = Enum.TextYAlignment.Top
number.RobloxLocked = true
number.Parent = frame
local prompt = Instance.new("TextLabel")
prompt.Name = "UserPrompt"
prompt.BackgroundTransparency = 1
prompt.TextColor3 = Color3.new(1, 1, 1)
prompt.FontSize = Enum.FontSize.Size14
prompt.Position = UDim2.new(0, 28, 0, 2)
prompt.Size = UDim2.new(1, -32, 1, -4)
prompt.TextXAlignment = Enum.TextXAlignment.Left
prompt.TextYAlignment = Enum.TextYAlignment.Top
prompt.TextWrap = true
prompt.RobloxLocked = true
prompt.Parent = frame
return frame return frame
end end
local initialize local initialize
@ -376,19 +376,18 @@ initialize = function(parent)
lastChoice = newChoice("5)") lastChoice = newChoice("5)")
lastChoice.UserPrompt.Text = "Goodbye!" lastChoice.UserPrompt.Text = "Goodbye!"
lastChoice.Size = UDim2.new(1, 0, 0, 28) lastChoice.Size = UDim2.new(1, 0, 0, 28)
mainFrame = Instance.new("Frame") mainFrame = New("Frame", "UserDialogArea", {
mainFrame.Name = "UserDialogArea" Size = UDim2.new(0, 350, 0, 200),
mainFrame.Size = UDim2.new(0, 350, 0, 200) Style = Enum.FrameStyle.ChatBlue,
mainFrame.Style = Enum.FrameStyle.ChatBlue Visible = false,
mainFrame.Visible = false New("ImageLabel", "Tail", {
local imageLabel = Instance.new("ImageLabel") Size = UDim2.new(0, 62, 0, 53),
imageLabel.Name = "Tail" Position = UDim2.new(1, 8, 0.25),
imageLabel.Size = UDim2.new(0, 62, 0, 53) Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png",
imageLabel.Position = UDim2.new(1, 8, 0.25) BackgroundTransparency = 1,
imageLabel.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png" RobloxLocked = true
imageLabel.BackgroundTransparency = 1 })
imageLabel.RobloxLocked = true })
imageLabel.Parent = mainFrame
for _, obj in pairs(choices) do for _, obj in pairs(choices) do
obj.RobloxLocked = true obj.RobloxLocked = true
obj.Parent = mainFrame obj.Parent = mainFrame
@ -515,13 +514,13 @@ onLoad = function()
messageDialog.RobloxLocked = true messageDialog.RobloxLocked = true
messageDialog.Parent = gui messageDialog.Parent = gui
waitForChild(gui, "BottomLeftControl") waitForChild(gui, "BottomLeftControl")
local frame = Instance.new("Frame") local frame = New("Frame", "DialogFrame", {
frame.Name = "DialogFrame" Position = UDim2.new(0, 0, 0, 0),
frame.Position = UDim2.new(0, 0, 0, 0) Size = UDim2.new(0, 0, 0, 0),
frame.Size = UDim2.new(0, 0, 0, 0) BackgroundTransparency = 1,
frame.BackgroundTransparency = 1 RobloxLocked = true,
frame.RobloxLocked = true Parent = gui.BottomLeftControl
frame.Parent = gui.BottomLeftControl })
initialize(frame) initialize(frame)
game.CollectionService.ItemAdded:connect(function(obj) game.CollectionService.ItemAdded:connect(function(obj)
if obj:IsA("Dialog") then if obj:IsA("Dialog") then

View File

@ -23,11 +23,11 @@ New = (className, name, props) ->
-- --
waitForProperty = (instance, name) -> waitForProperty = (instance, name) ->
while not instance[name] until instance[name]
instance.Changed\wait! instance.Changed\wait!
waitForChild = (instance, name) -> waitForChild = (instance, name) ->
while not instance\FindFirstChild name until instance\FindFirstChild name
instance.ChildAdded\wait! instance.ChildAdded\wait!
local mainFrame local mainFrame
@ -132,43 +132,41 @@ styleMainFrame = (tone) ->
styleChoices tone styleChoices tone
setChatNotificationTone = (gui, purpose, tone) -> setChatNotificationTone = (gui, purpose, tone) ->
if tone == Enum.DialogTone.Neutral gui.Image.Image = if tone == Enum.DialogTone.Neutral
gui.Image.Image = "rbxasset://textures/chatBubble_botBlue_notify_bkg.png" "rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
elseif tone == Enum.DialogTone.Friendly elseif tone == Enum.DialogTone.Friendly
gui.Image.Image = "rbxasset://textures/chatBubble_botGreen_notify_bkg.png" "rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
elseif tone == Enum.DialogTone.Enemy elseif tone == Enum.DialogTone.Enemy
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png" "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
if purpose == Enum.DialogPurpose.Quest gui.Image.Button.Image = if purpose == Enum.DialogPurpose.Quest
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_bang.png" "rbxasset://textures/chatBubble_bot_notify_bang.png"
elseif purpose == Enum.DialogPurpose.Help elseif purpose == Enum.DialogPurpose.Help
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_question.png" "rbxasset://textures/chatBubble_bot_notify_question.png"
elseif purpose == Enum.DialogPurpose.Shop elseif purpose == Enum.DialogPurpose.Shop
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_money.png" "rbxasset://textures/chatBubble_bot_notify_money.png"
createMessageDialog = -> createMessageDialog = ->
messageDialog = Instance.new "Frame" messageDialog = New "Frame", "DialogScriptMessage"
messageDialog.Name = "DialogScriptMessage" Style: Enum.FrameStyle.RobloxRound
messageDialog.Style = Enum.FrameStyle.RobloxRound Visible: false
messageDialog.Visible = false
text = Instance.new "TextLabel" * New "TextLabel", "Text"
text.Name = "Text" Position: UDim2.new 0, 0, 0, -1
text.Position = UDim2.new 0, 0, 0, -1 Size: UDim2.new 1, 0, 1, 0
text.Size = UDim2.new 1, 0, 1, 0 FontSize: Enum.FontSize.Size14
text.FontSize = Enum.FontSize.Size14 BackgroundTransparency: 1
text.BackgroundTransparency = 1 TextColor3: Color3.new 1, 1, 1
text.TextColor3 = Color3.new 1, 1, 1 RobloxLocked: true
text.RobloxLocked = true
text.Parent = messageDialog
showMessage = (msg, size) -> showMessage = (msg, size) ->
messageDialog.Text.Text = msg with messageDialog
messageDialog.Size = UDim2.new 0, size, 0, 40 .Text.Text = msg
messageDialog.Position = UDim2.new 0.5, -size / 2, 0.5, -40 .Size = UDim2.new 0, size, 0, 40
messageDialog.Visible = true .Position = UDim2.new 0.5, -size / 2, 0.5, -40
wait 2 .Visible = true
messageDialog.Visible = false wait 2
.Visible = false
variableDelay = (str) -> variableDelay = (str) ->
length = math.min string.len(str), 100 length = math.min string.len(str), 100
@ -226,14 +224,15 @@ sanitizeMessage = (msg) ->
msg msg
renewKillswitch = (dialog) -> renewKillswitch = (dialog) ->
if currentAbortDialogScript with currentAbortDialogScript
currentAbortDialogScript\Remove! if currentAbortDialogScript
currentAbortDialogScript = nil \Remove!
currentAbortDialogScript = nil
currentAbortDialogScript = timeoutScript\Clone! currentAbortDialogScript = timeoutScript\Clone!
currentAbortDialogScript.archivable = false .archivable = false
currentAbortDialogScript.Disabled = false .Disabled = false
currentAbortDialogScript.Parent = dialog .Parent = dialog
presentDialogChoices = (talkingPart, dialogChoices) -> presentDialogChoices = (talkingPart, dialogChoices) ->
return if not currentConversationDialog return if not currentConversationDialog
@ -269,8 +268,8 @@ presentDialogChoices = (talkingPart, dialogChoices) ->
choiceMap[choices[pos]] = obj choiceMap[choices[pos]] = obj
yPosition = yPosition + height yPosition += height
pos = pos + 1 pos += 1
lastChoice.Position = UDim2.new 0, 0, 0, yPosition lastChoice.Position = UDim2.new 0, 0, 0, yPosition
lastChoice.Number.Text = pos .. ")" lastChoice.Number.Text = pos .. ")"
@ -310,44 +309,41 @@ selectChoice = (choice) ->
presentDialogChoices currentConversationPartner, dialogChoice\GetChildren! presentDialogChoices currentConversationPartner, dialogChoice\GetChildren!
newChoice = (numberText) -> newChoice = (numberText) ->
frame = Instance.new "TextButton" frame = New "TextButton"
frame.BackgroundColor3 = Color3.new 0, 0, 179 / 255 BackgroundColor3: Color3.new 0, 0, 179 / 255
frame.AutoButtonColor = false AutoButtonColor: false
frame.BorderSizePixel = 0 BorderSizePixel: 0
frame.Text = "" Text: ""
RobloxLocked: true
* New "TextLabel", "Number"
TextColor3: Color3.new 127 / 255, 212 / 255, 255 / 255
Text: numberText
FontSize: Enum.FontSize.Size14
BackgroundTransparency: 1
Position: UDim2.new 0, 4, 0, 2
Size: UDim2.new 0, 20, 0, 24
TextXAlignment: Enum.TextXAlignment.Left
TextYAlignment: Enum.TextYAlignment.Top
RobloxLocked: true
* New "TextLabel", "UserPrompt"
BackgroundTransparency: 1
TextColor3: Color3.new 1, 1, 1
FontSize: Enum.FontSize.Size14
Position: UDim2.new 0, 28, 0, 2
Size: UDim2.new 1, -32, 1, -4
TextXAlignment: Enum.TextXAlignment.Left
TextYAlignment: Enum.TextYAlignment.Top
TextWrap: true
RobloxLocked: true
frame.MouseEnter\connect -> frame.MouseEnter\connect ->
highlightColor frame, currentTone! highlightColor frame, currentTone!
frame.MouseLeave\connect -> frame.MouseLeave\connect ->
resetColor frame, currentTone! resetColor frame, currentTone!
frame.MouseButton1Click\connect -> frame.MouseButton1Click\connect ->
selectChoice frame selectChoice frame
frame.RobloxLocked = true
number = Instance.new "TextLabel"
number.Name = "Number"
number.TextColor3 = Color3.new 127 / 255, 212 / 255, 255 / 255
number.Text = numberText
number.FontSize = Enum.FontSize.Size14
number.BackgroundTransparency = 1
number.Position = UDim2.new 0, 4, 0, 2
number.Size = UDim2.new 0, 20, 0, 24
number.TextXAlignment = Enum.TextXAlignment.Left
number.TextYAlignment = Enum.TextYAlignment.Top
number.RobloxLocked = true
number.Parent = frame
prompt = Instance.new "TextLabel"
prompt.Name = "UserPrompt"
prompt.BackgroundTransparency = 1
prompt.TextColor3 = Color3.new 1, 1, 1
prompt.FontSize = Enum.FontSize.Size14
prompt.Position = UDim2.new 0, 28, 0, 2
prompt.Size = UDim2.new 1, -32, 1, -4
prompt.TextXAlignment = Enum.TextXAlignment.Left
prompt.TextYAlignment = Enum.TextYAlignment.Top
prompt.TextWrap = true
prompt.RobloxLocked = true
prompt.Parent = frame
frame frame
@ -361,20 +357,17 @@ initialize = (parent) ->
lastChoice.UserPrompt.Text = "Goodbye!" lastChoice.UserPrompt.Text = "Goodbye!"
lastChoice.Size = UDim2.new 1, 0, 0, 28 lastChoice.Size = UDim2.new 1, 0, 0, 28
mainFrame = Instance.new "Frame" mainFrame = New "Frame", "UserDialogArea"
mainFrame.Name = "UserDialogArea" Size: UDim2.new 0, 350, 0, 200
mainFrame.Size = UDim2.new 0, 350, 0, 200 Style: Enum.FrameStyle.ChatBlue
mainFrame.Style = Enum.FrameStyle.ChatBlue Visible: false
mainFrame.Visible = false
imageLabel = Instance.new "ImageLabel" * New "ImageLabel", "Tail"
imageLabel.Name = "Tail" Size: UDim2.new 0, 62, 0, 53
imageLabel.Size = UDim2.new 0, 62, 0, 53 Position: UDim2.new 1, 8, 0.25
imageLabel.Position = UDim2.new 1, 8, 0.25 Image: "rbxasset://textures/chatBubble_botBlue_tailRight.png"
imageLabel.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png" BackgroundTransparency: 1
imageLabel.BackgroundTransparency = 1 RobloxLocked: true
imageLabel.RobloxLocked = true
imageLabel.Parent = mainFrame
for _, obj in pairs choices for _, obj in pairs choices
obj.RobloxLocked = true obj.RobloxLocked = true
@ -386,7 +379,7 @@ initialize = (parent) ->
mainFrame.Parent = parent mainFrame.Parent = parent
doDialog = (dialog) -> doDialog = (dialog) ->
while not Instance.Lock dialog, player until Instance.Lock dialog, player
wait! wait!
if dialog.InUse if dialog.InUse
@ -438,12 +431,13 @@ addDialog = (dialog) ->
if dialog.Parent if dialog.Parent
if dialog.Parent\IsA "BasePart" if dialog.Parent\IsA "BasePart"
chatGui = chatNotificationGui\clone! chatGui = chatNotificationGui\clone!
chatGui.Enabled = not dialog.InUse with chatGui
chatGui.Adornee = dialog.Parent .Enabled = not dialog.InUse
chatGui.RobloxLocked = true .Adornee = dialog.Parent
chatGui.Parent = game.CoreGui .RobloxLocked = true
chatGui.Image.Button.MouseButton1Click\connect -> .Parent = game.CoreGui
startDialog dialog .Image.Button.MouseButton1Click\connect ->
startDialog dialog
setChatNotificationTone chatGui, dialog.Purpose, dialog.Tone setChatNotificationTone chatGui, dialog.Purpose, dialog.Tone
@ -501,13 +495,13 @@ onLoad = ->
waitForChild gui, "BottomLeftControl" waitForChild gui, "BottomLeftControl"
--print "Initializing Frame" --print "Initializing Frame"
frame = Instance.new "Frame" frame = New "Frame", "DialogFrame"
frame.Name = "DialogFrame" Position: UDim2.new 0, 0, 0, 0
frame.Position = UDim2.new 0, 0, 0, 0 Size: UDim2.new 0, 0, 0, 0
frame.Size = UDim2.new 0, 0, 0, 0 BackgroundTransparency: 1
frame.BackgroundTransparency = 1 RobloxLocked: true
frame.RobloxLocked = true Parent: gui.BottomLeftControl
frame.Parent = gui.BottomLeftControl
initialize frame initialize frame
--print "Adding Dialogs" --print "Adding Dialogs"

View File

@ -818,27 +818,29 @@ t.CreateTrueScrollingFrame = function()
end end
end) end)
local scrollDownButton = scrollUpButton:clone() local scrollDownButton = scrollUpButton:clone()
scrollDownButton.Name = "ScrollDownButton" do
scrollDownButton.Position = UDim2.new(0, 0, 1, -18) scrollDownButton.Name = "ScrollDownButton"
local downChildren = scrollDownButton:GetChildren() scrollDownButton.Position = UDim2.new(0, 0, 1, -18)
for i = 1, #downChildren do local downChildren = scrollDownButton:GetChildren()
downChildren[i].Position = UDim2.new(0, 3 + (i - 1), 0.5, -2 + (i - 1)) for i = 1, #downChildren do
downChildren[i].Position = UDim2.new(0, 3 + (i - 1), 0.5, -2 + (i - 1))
end
scrollDownButton.MouseEnter:connect(function()
scrollDownButton.BackgroundTransparency = 0.1
downChildren = scrollDownButton:GetChildren()
for i = 1, #downChildren do
downChildren[i].BackgroundTransparency = 0.1
end
end)
scrollDownButton.MouseLeave:connect(function()
scrollDownButton.BackgroundTransparency = 0.5
downChildren = scrollDownButton:GetChildren()
for i = 1, #downChildren do
downChildren[i].BackgroundTransparency = 0.5
end
end)
scrollDownButton.Parent = controlFrame
end end
scrollDownButton.MouseEnter:connect(function()
scrollDownButton.BackgroundTransparency = 0.1
downChildren = scrollDownButton:GetChildren()
for i = 1, #downChildren do
downChildren[i].BackgroundTransparency = 0.1
end
end)
scrollDownButton.MouseLeave:connect(function()
scrollDownButton.BackgroundTransparency = 0.5
downChildren = scrollDownButton:GetChildren()
for i = 1, #downChildren do
downChildren[i].BackgroundTransparency = 0.5
end
end)
scrollDownButton.Parent = controlFrame
local newNub = scrollNub:clone() local newNub = scrollNub:clone()
newNub.Position = UDim2.new(0.5, -5, 0.5, -2) newNub.Position = UDim2.new(0.5, -5, 0.5, -2)
newNub.Parent = scrollbar newNub.Parent = scrollbar

View File

@ -114,7 +114,7 @@ setSliderPos = (newAbsPosX, slider, sliderPosition, bar, steps) ->
relativePosX = math.min 1, math.max 0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X relativePosX = math.min 1, math.max 0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X
wholeNum, remainder = math.modf relativePosX * newStep wholeNum, remainder = math.modf relativePosX * newStep
if remainder > 0.5 if remainder > 0.5
wholeNum = wholeNum + 1 wholeNum += 1
relativePosX = wholeNum / newStep relativePosX = wholeNum / newStep
@ -350,7 +350,7 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
obj.TextColor3 = Color3.new 1, 1, 1 obj.TextColor3 = Color3.new 1, 1, 1
obj.BackgroundTransparency = 1 obj.BackgroundTransparency = 1
childNum = childNum + 1 childNum += 1
toggleVisibility = -> toggleVisibility = ->
dropDownSelected = not dropDownSelected dropDownSelected = not dropDownSelected
@ -381,7 +381,7 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
else else
obj.Font = Enum.Font.Arial obj.Font = Enum.Font.Arial
childNum = childNum + 1 childNum += 1
if not text if not text
dropDownMenu.Text = "Choose One" dropDownMenu.Text = "Choose One"
@ -397,7 +397,7 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
scrollDown = -> scrollDown = ->
if scrollBarPosition + dropDownItemCount <= itemCount if scrollBarPosition + dropDownItemCount <= itemCount
scrollBarPosition = scrollBarPosition + 1 scrollBarPosition += 1
updateScroll! updateScroll!
return true return true
@ -405,7 +405,7 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
scrollUp = -> scrollUp = ->
if scrollBarPosition > 1 if scrollBarPosition > 1
scrollBarPosition = scrollBarPosition - 1 scrollBarPosition -= 1
updateScroll! updateScroll!
return true return true
@ -578,7 +578,7 @@ layoutGuiObjectsHelper = (frame, guiObjects, settingsTable) ->
child.TextBounds.Y + settingsTable[settingsTableIndex] child.TextBounds.Y + settingsTable[settingsTableIndex]
) )
while not child.TextFits until child.TextFits
child.Size = UDim2.new child.Size.X.Scale, child.Size.X.Offset, 0, child.AbsoluteSize.Y + 1 child.Size = UDim2.new child.Size.X.Scale, child.Size.X.Offset, 0, child.AbsoluteSize.Y + 1
pixelsRemaining -= child.AbsoluteSize.Y pixelsRemaining -= child.AbsoluteSize.Y
@ -820,25 +820,27 @@ t.CreateTrueScrollingFrame = ->
upChildren[i].BackgroundTransparency = 0.5 upChildren[i].BackgroundTransparency = 0.5
scrollDownButton = scrollUpButton\clone! scrollDownButton = scrollUpButton\clone!
scrollDownButton.Name = "ScrollDownButton"
scrollDownButton.Position = UDim2.new 0, 0, 1, -18
downChildren = scrollDownButton\GetChildren!
for i = 1, #downChildren
downChildren[i].Position = UDim2.new 0, 3 + (i - 1), 0.5, -2 + (i - 1)
scrollDownButton.MouseEnter\connect -> with scrollDownButton
scrollDownButton.BackgroundTransparency = 0.1 .Name = "ScrollDownButton"
downChildren = scrollDownButton\GetChildren! .Position = UDim2.new 0, 0, 1, -18
downChildren = \GetChildren!
for i = 1, #downChildren for i = 1, #downChildren
downChildren[i].BackgroundTransparency = 0.1 downChildren[i].Position = UDim2.new 0, 3 + (i - 1), 0.5, -2 + (i - 1)
scrollDownButton.MouseLeave\connect -> .MouseEnter\connect ->
scrollDownButton.BackgroundTransparency = 0.5 .BackgroundTransparency = 0.1
downChildren = scrollDownButton\GetChildren! downChildren = \GetChildren!
for i = 1, #downChildren for i = 1, #downChildren
downChildren[i].BackgroundTransparency = 0.5 downChildren[i].BackgroundTransparency = 0.1
scrollDownButton.Parent = controlFrame .MouseLeave\connect ->
.BackgroundTransparency = 0.5
downChildren = \GetChildren!
for i = 1, #downChildren
downChildren[i].BackgroundTransparency = 0.5
.Parent = controlFrame
newNub = scrollNub\clone! newNub = scrollNub\clone!
newNub.Position = UDim2.new 0.5, -5, 0.5, -2 newNub.Position = UDim2.new 0.5, -5, 0.5, -2
@ -1072,10 +1074,10 @@ t.CreateTrueScrollingFrame = ->
break if mouseYPos and mouseYPos < (scrollbar.AbsolutePosition.y + scrollbar.AbsoluteSize.x) break if mouseYPos and mouseYPos < (scrollbar.AbsolutePosition.y + scrollbar.AbsoluteSize.x)
break if not scrollDownButton.Active break if not scrollDownButton.Active
if tick! - t > 5 w = if tick! - t > 5
w = 0 0
elseif tick! - t > 2 elseif tick! - t > 2
w = 0.06 0.06
wait w wait w
@ -1242,7 +1244,7 @@ t.CreateTrueScrollingFrame = ->
button.Parent = frame button.Parent = frame
buttonObjs[buttonNum] = button buttonObjs[buttonNum] = button
buttonNum = buttonNum + 1 buttonNum += 1
numButtons = buttonNum - 1 numButtons = buttonNum - 1
if numButtons == 1 if numButtons == 1
@ -1263,7 +1265,7 @@ t.CreateTrueScrollingFrame = ->
buttonObjs[buttonNum].Position = buttonObjs[buttonNum].Position =
UDim2.new(spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset) UDim2.new(spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset)
buttonObjs[buttonNum].Size = UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset) buttonObjs[buttonNum].Size = UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
buttonNum = buttonNum + 1 buttonNum += 1
end end
@ -1272,7 +1274,7 @@ t.CreateTrueScrollingFrame = ->
relativePosX = math.min(1, math.max(0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X)) relativePosX = math.min(1, math.max(0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X))
local wholeNum, remainder = math.modf(relativePosX * newStep) local wholeNum, remainder = math.modf(relativePosX * newStep)
if remainder > 0.5 if remainder > 0.5
wholeNum = wholeNum + 1 wholeNum += 1
relativePosX = wholeNum / newStep relativePosX = wholeNum / newStep
result = math.ceil(relativePosX * newStep) result = math.ceil(relativePosX * newStep)
@ -1522,7 +1524,7 @@ t.CreateTrueScrollingFrame = ->
obj.TextColor3 = Color3.new 1, 1, 1 obj.TextColor3 = Color3.new 1, 1, 1
obj.BackgroundTransparency = 1 obj.BackgroundTransparency = 1
childNum = childNum + 1 childNum += 1
toggleVisibility = function() toggleVisibility = function()
@ -1555,7 +1557,7 @@ t.CreateTrueScrollingFrame = ->
else else
obj.Font = Enum.Font.Arial obj.Font = Enum.Font.Arial
childNum = childNum + 1 childNum += 1
@ -1576,14 +1578,14 @@ t.CreateTrueScrollingFrame = ->
scrollDown = ! scrollDown = !
if scrollBarPosition + dropDownItemCount <= itemCount if scrollBarPosition + dropDownItemCount <= itemCount
scrollBarPosition = scrollBarPosition + 1 scrollBarPosition += 1
updateScroll! updateScroll!
return true return true
return false return false
scrollUp = ! scrollUp = !
if scrollBarPosition > 1 if scrollBarPosition > 1
scrollBarPosition = scrollBarPosition - 1 scrollBarPosition -= 1
updateScroll! updateScroll!
return true return true
@ -1599,7 +1601,7 @@ t.CreateTrueScrollingFrame = ->
scrollUpButton.Position = UDim2.new(1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0) scrollUpButton.Position = UDim2.new(1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0)
scrollUpButton.MouseButton1Click\connect -> scrollUpButton.MouseButton1Click\connect ->
scrollMouseCount += 1 scrollMouseCount += 1
)
scrollUpButton.MouseLeave\connect -> scrollUpButton.MouseLeave\connect ->
scrollMouseCount += 1 scrollMouseCount += 1
) )
@ -1813,7 +1815,7 @@ t.CreateTrueScrollingFrame = ->
) )
while not child.TextFits until child.TextFits
child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, child.AbsoluteSize.Y + 1) child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, child.AbsoluteSize.Y + 1)
pixelsRemaining -= child.AbsoluteSize.Y pixelsRemaining -= child.AbsoluteSize.Y
@ -2607,20 +2609,20 @@ t.CreateTrueScrollingFrame = ->
pos = scrollPosition pos = scrollPosition
--count up from current scroll position to fill out grid --count up from current scroll position to fill out grid
while pos <= #guiObjects and pixelsBelowScrollbar < totalPixelsY while pos <= #guiObjects and pixelsBelowScrollbar < totalPixelsY
xCounter = xCounter + guiObjects[pos].AbsoluteSize.X xCounter += guiObjects[pos].AbsoluteSize.X
--previous pos was the end of a row --previous pos was the end of a row
if xCounter >= totalPixelsX if xCounter >= totalPixelsX
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY pixelsBelowScrollbar += currentRowY
currentRowY = 0 currentRowY = 0
xCounter = guiObjects[pos].AbsoluteSize.X xCounter = guiObjects[pos].AbsoluteSize.X
if guiObjects[pos].AbsoluteSize.Y > currentRowY if guiObjects[pos].AbsoluteSize.Y > currentRowY
currentRowY = guiObjects[pos].AbsoluteSize.Y currentRowY = guiObjects[pos].AbsoluteSize.Y
pos = pos + 1 pos += 1
--Count wherever current row left off --Count wherever current row left off
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY pixelsBelowScrollbar += currentRowY
currentRowY = 0 currentRowY = 0
pos = scrollPosition - 1 pos = scrollPosition - 1
@ -2631,20 +2633,20 @@ t.CreateTrueScrollingFrame = ->
--count backwards from current scrollPosition to see if we can add more rows --count backwards from current scrollPosition to see if we can add more rows
while pixelsBelowScrollbar + currentRowY < totalPixelsY and pos >= 1 while pixelsBelowScrollbar + currentRowY < totalPixelsY and pos >= 1
xCounter = xCounter + guiObjects[pos].AbsoluteSize.X xCounter += guiObjects[pos].AbsoluteSize.X
rowSizeCounter = rowSizeCounter + 1 rowSizeCounter += 1
if xCounter >= totalPixelsX if xCounter >= totalPixelsX
rowSize = rowSizeCounter - 1 rowSize = rowSizeCounter - 1
rowSizeCounter = 0 rowSizeCounter = 0
xCounter = guiObjects[pos].AbsoluteSize.X xCounter = guiObjects[pos].AbsoluteSize.X
if pixelsBelowScrollbar + currentRowY <= totalPixelsY if pixelsBelowScrollbar + currentRowY <= totalPixelsY
--It fits, so back up our scroll position --It fits, so back up our scroll position
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY pixelsBelowScrollbar += currentRowY
if scrollPosition <= rowSize if scrollPosition <= rowSize
scrollPosition = 1 scrollPosition = 1
break break
else else
scrollPosition = scrollPosition - rowSize scrollPosition -= rowSize
currentRowY = 0 currentRowY = 0
else else
@ -2656,7 +2658,7 @@ t.CreateTrueScrollingFrame = ->
currentRowY = guiObjects[pos].AbsoluteSize.Y currentRowY = guiObjects[pos].AbsoluteSize.Y
pos = pos - 1 pos -= 1
--Do check last time if pos = 0 --Do check last time if pos = 0
@ -2688,7 +2690,7 @@ t.CreateTrueScrollingFrame = ->
--print("Laying out " .. child.Name) --print("Laying out " .. child.Name)
--GuiObject --GuiObject
if setRowSize if setRowSize
rowSizeCounter = rowSizeCounter + 1 rowSizeCounter += 1
if xCounter + child.AbsoluteSize.X >= totalPixelsX if xCounter + child.AbsoluteSize.X >= totalPixelsX
if setRowSize if setRowSize
@ -2696,7 +2698,7 @@ t.CreateTrueScrollingFrame = ->
setRowSize = false setRowSize = false
xCounter = 0 xCounter = 0
pixelsRemainingY = pixelsRemainingY - child.AbsoluteSize.Y pixelsRemainingY -= child.AbsoluteSize.Y
child.Position = UDim2.new( child.Position = UDim2.new(
child.Position.X.Scale, child.Position.X.Scale,
@ -2704,10 +2706,10 @@ t.CreateTrueScrollingFrame = ->
0, 0,
totalPixelsY - pixelsRemainingY + yOffset totalPixelsY - pixelsRemainingY + yOffset
) )
xCounter = xCounter + child.AbsoluteSize.X xCounter += child.AbsoluteSize.X
child.Visible = ((pixelsRemainingY - child.AbsoluteSize.Y) >= 0) child.Visible = ((pixelsRemainingY - child.AbsoluteSize.Y) >= 0)
if child.Visible if child.Visible
howManyDisplayed = howManyDisplayed + 1 howManyDisplayed += 1
lastChildSize = child.AbsoluteSize lastChildSize = child.AbsoluteSize
@ -2762,23 +2764,23 @@ t.CreateTrueScrollingFrame = ->
pos = #guiObjects pos = #guiObjects
while pixelsBelowScrollbar < totalPixels and pos >= 1 while pixelsBelowScrollbar < totalPixels and pos >= 1
if pos >= scrollPosition if pos >= scrollPosition
pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y pixelsBelowScrollbar += guiObjects[pos].AbsoluteSize.Y
else else
if pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y <= totalPixels if pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y <= totalPixels
--It fits, so back up our scroll position --It fits, so back up our scroll position
pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y pixelsBelowScrollbar += guiObjects[pos].AbsoluteSize.Y
if scrollPosition <= 1 if scrollPosition <= 1
scrollPosition = 1 scrollPosition = 1
break break
else else
--local ("Backing up ScrollPosition from -- " ..scrollPosition) --local ("Backing up ScrollPosition from -- " ..scrollPosition)
scrollPosition = scrollPosition - 1 scrollPosition -= 1
else else
break break
pos = pos - 1 pos -= 1
pos = scrollPosition pos = scrollPosition
@ -2798,7 +2800,7 @@ t.CreateTrueScrollingFrame = ->
pixelsRemaining -= child.AbsoluteSize.Y pixelsRemaining -= child.AbsoluteSize.Y
if pixelsRemaining >= 0 if pixelsRemaining >= 0
child.Visible = true child.Visible = true
howManyDisplayed = howManyDisplayed + 1 howManyDisplayed += 1
else else
child.Visible = false child.Visible = false
@ -2816,7 +2818,7 @@ t.CreateTrueScrollingFrame = ->
if children if children
for _, child in ipairs(children) for _, child in ipairs(children)
if child\IsA "GuiObject" if child\IsA "GuiObject"
guiObjects = guiObjects + 1 guiObjects += 1
@ -2871,14 +2873,14 @@ t.CreateTrueScrollingFrame = ->
reentrancyGuard = false reentrancyGuard = false
doScrollUp = function() doScrollUp = function()
scrollPosition = scrollPosition - rowSize scrollPosition -= rowSize
if scrollPosition < 1 if scrollPosition < 1
scrollPosition = 1 scrollPosition = 1
recalculate(nil) recalculate(nil)
doScrollDown = function() doScrollDown = function()
scrollPosition = scrollPosition + rowSize scrollPosition += rowSize
recalculate(nil) recalculate(nil)
scrollUp = function(mouseYPos) scrollUp = function(mouseYPos)
@ -2958,19 +2960,16 @@ t.CreateTrueScrollingFrame = ->
dragAbsSize = scrollDrag.AbsoluteSize.y dragAbsSize = scrollDrag.AbsoluteSize.y
barAbsOne = barAbsPos + barAbsSize - dragAbsSize barAbsOne = barAbsPos + barAbsSize - dragAbsSize
y = y - mouseOffset y -= mouseOffset
y = y < barAbsPos and barAbsPos or y > barAbsOne and barAbsOne or y y = y < barAbsPos and barAbsPos or y > barAbsOne and barAbsOne or y
y = y - barAbsPos y -= barAbsPos
guiObjects = 0 guiObjects = 0
children = frame\GetChildren! children = frame\GetChildren!
if children if children
for _, child in ipairs(children) for _, child in ipairs(children)
if child\IsA "GuiObject" if child\IsA "GuiObject"
guiObjects = guiObjects + 1 guiObjects += 1
doublePercent = y / (barAbsSize - dragAbsSize) doublePercent = y / (barAbsSize - dragAbsSize)
rowDiff = rowSize rowDiff = rowSize
@ -2979,11 +2978,9 @@ t.CreateTrueScrollingFrame = ->
if newScrollPosition < scrollPosition if newScrollPosition < scrollPosition
rowDiff = -rowDiff rowDiff = -rowDiff
if newScrollPosition < 1 if newScrollPosition < 1
newScrollPosition = 1 newScrollPosition = 1
scrollPosition = newScrollPosition scrollPosition = newScrollPosition
recalculate(nil) recalculate(nil)
) )
@ -3495,7 +3492,7 @@ t.CreateTrueScrollingFrame = ->
imageLabel.Position = UDim2.new 0.5 - (x / y) / 2, 0, 0, 0) imageLabel.Position = UDim2.new 0.5 - (x / y) / 2, 0, 0, 0)
size = size + 50 size += 50
frame.Size = UDim2.new 0, size, 0, size) frame.Size = UDim2.new 0, size, 0, size)
frame.Position = UDim2.new 0.5, -size / 2, 0.5, -size / 2) frame.Position = UDim2.new 0.5, -size / 2, 0.5, -size / 2)
@ -3868,7 +3865,7 @@ t.CreateTrueScrollingFrame = ->
numSkipped = 0 numSkipped = 0
for i = 1, #sets for i = 1, #sets
if not showAdminCategories and sets[i].Name == "Beta" if not showAdminCategories and sets[i].Name == "Beta"
numSkipped = numSkipped + 1 numSkipped += 1
else else
setButtons[i - numSkipped] = setButtons[i - numSkipped] =
buildSetButton(sets[i].Name, sets[i].CategoryId, sets[i].ImageAssetId, i - numSkipped, #sets) buildSetButton(sets[i].Name, sets[i].CategoryId, sets[i].ImageAssetId, i - numSkipped, #sets)
@ -4068,10 +4065,10 @@ t.CreateTrueScrollingFrame = ->
y = 0 y = 0
for i = 1, #insertButtons for i = 1, #insertButtons
insertButtons[i].Position = UDim2.new 0, buttonWidth * x, 0, buttonHeight * y) insertButtons[i].Position = UDim2.new 0, buttonWidth * x, 0, buttonHeight * y)
x = x + 1 x += 1
if x >= columns if x >= columns
x = 0 x = 0
y = y + 1 y += 1
@ -4125,7 +4122,7 @@ t.CreateTrueScrollingFrame = ->
insertButtons[arrayPosition], buttonCon = buildInsertButton() insertButtons[arrayPosition], buttonCon = buildInsertButton()
table.insert(insertButtonCons, buttonCon) table.insert(insertButtonCons, buttonCon)
insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame
arrayPosition = arrayPosition + 1 arrayPosition += 1
realignButtonGrid(columns) realignButtonGrid(columns)
@ -4277,7 +4274,7 @@ t.CreateTrueScrollingFrame = ->
selectSet(button, button.Text, userCategoryButtons[i].SetId.Value, 0) selectSet(button, button.Text, userCategoryButtons[i].SetId.Value, 0)
) )
currRow = currRow + 1 currRow += 1
buttons = setGui.SetPanel.Sets.SetsLists\GetChildren! buttons = setGui.SetPanel.Sets.SetsLists\GetChildren!
@ -4988,7 +4985,7 @@ t.CreateTrueScrollingFrame = ->
widgetContainer.Size = UDim2.new 0, dragBar.AbsoluteSize.X, 0, 400) widgetContainer.Size = UDim2.new 0, dragBar.AbsoluteSize.X, 0, 400)
if position if position
widgetContainer.Position = position + UDim2.new 0, 0, 0, 20) widgetContainer.Position += UDim2.new 0, 0, 0, 20)
local frame, control, verticalDragger = nil local frame, control, verticalDragger = nil
if scrollable if scrollable

15
yue/45374389.lua Normal file
View File

@ -0,0 +1,15 @@
local t = { }
t.Foo = function()
return print("foo")
end
t.Bar = function()
return print("bar")
end
t.Help = function(funcNameOrFunc)
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

View File

@ -0,0 +1,16 @@
t = {}
t.Foo = ->
print "foo"
t.Bar = ->
print "bar"
t.Help = (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
return "Function Foo. Arguments: None. Side effect: prints foo"
elseif funcNameOrFunc == "Bar" or funcNameOrFunc == t.Bar
return "Function Bar. Arguments: None. Side effect: prints bar"
t

90
yue/48488451.lua Normal file
View File

@ -0,0 +1,90 @@
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = New(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local popupFrame = New("Frame", "Popup", {
Position = UDim2.new(0.5, -165, 0.5, -175),
Size = UDim2.new(0, 330, 0, 350),
Style = Enum.FrameStyle.RobloxRound,
ZIndex = 4,
Visible = false,
Parent = script.Parent,
New("TextLabel", "PopupText", {
Size = UDim2.new(1, 0, 0.8, 0),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36,
BackgroundTransparency = 1,
Text = "Hello I'm a popup",
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
TextWrap = true,
ZIndex = 5
}),
New("TextButton", "AcceptButton", {
Position = UDim2.new(0, 20, 0, 270),
Size = UDim2.new(0, 100, 0, 50),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size24,
Style = Enum.ButtonStyle.RobloxButton,
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
Text = "Yes",
ZIndex = 5
}),
New("ImageLabel", "PopupImage", {
BackgroundTransparency = 1,
Position = UDim2.new(0.5, -140, 0, 0),
Size = UDim2.new(0, 280, 0, 280),
ZIndex = 3,
New("ImageLabel", "Backing", {
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Image = "http://www.roblox.com/asset/?id=47574181",
ZIndex = 2
})
})
})
local AcceptButton = popupFrame.AcceptButton
do
local _with_0 = popupFrame:clone()
_with_0.Name = "Darken"
_with_0.Size = UDim2.new(1, 16, 1, 16)
_with_0.Position = UDim2.new(0, -8, 0, -8)
_with_0.ZIndex = 1
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "DeclineButton"
_with_0.Position = UDim2.new(1, -120, 0, 270)
_with_0.Text = "No"
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "OKButton"
_with_0.Text = "OK"
_with_0.Position = UDim2.new(0.5, -50, 0, 270)
_with_0.Visible = false
_with_0.Parent = popupFrame
end
return script:remove()

View File

@ -0,0 +1,87 @@
-- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) ->
if not props? -- no name was provided
props = name
name = nil
obj = New className
obj.Name = name if name
local parent
for k, v in pairs props
if type(k) == "string"
if k == "Parent"
parent = v
else
obj[k] = v
elseif type(k) == "number" and type(v) == "userdata"
v.Parent = obj
obj.Parent = parent
obj
--
popupFrame = New "Frame", "Popup"
Position: UDim2.new 0.5, -165, 0.5, -175
Size: UDim2.new 0, 330, 0, 350
Style: Enum.FrameStyle.RobloxRound
ZIndex: 4
Visible: false
Parent: script.Parent
* New "TextLabel", "PopupText"
Size: UDim2.new 1, 0, 0.8, 0
Font: Enum.Font.ArialBold
FontSize: Enum.FontSize.Size36
BackgroundTransparency: 1
Text: "Hello I'm a popup"
TextColor3: Color3.new 248 / 255, 248 / 255, 248 / 255
TextWrap: true
ZIndex: 5
* New "TextButton", "AcceptButton"
Position: UDim2.new 0, 20, 0, 270
Size: UDim2.new 0, 100, 0, 50
Font: Enum.Font.ArialBold
FontSize: Enum.FontSize.Size24
Style: Enum.ButtonStyle.RobloxButton
TextColor3: Color3.new 248 / 255, 248 / 255, 248 / 255
Text: "Yes"
ZIndex: 5
* New "ImageLabel", "PopupImage"
BackgroundTransparency: 1
Position: UDim2.new 0.5, -140, 0, 0
Size: UDim2.new 0, 280, 0, 280
ZIndex: 3
* New "ImageLabel", "Backing"
BackgroundTransparency: 1
Size: UDim2.new 1, 0, 1, 0
Image: "http://www.roblox.com/asset/?id=47574181"
ZIndex: 2
:AcceptButton = popupFrame
with popupFrame\clone!
.Name = "Darken"
.Size = UDim2.new 1, 16, 1, 16
.Position = UDim2.new 0, -8, 0, -8
.ZIndex = 1
.Parent = popupFrame
with AcceptButton\clone!
.Name = "DeclineButton"
.Position = UDim2.new 1, -120, 0, 270
.Text = "No"
.Parent = popupFrame
with AcceptButton\clone!
.Name = "OKButton"
.Text = "OK"
.Position = UDim2.new 0.5, -50, 0, 270
.Visible = false
.Parent = popupFrame
script\remove!

View File

@ -1,7 +1,7 @@
local deepakTestingPlace = 3569749 local deepakTestingPlace = 3569749
local sc = game:GetService("ScriptContext") local sc = game:GetService("ScriptContext")
local tries = 0 local tries = 0
while not sc and tries < 3 do while not (sc or tries > 2) do
tries = tries + 1 tries = tries + 1
sc = game:GetService("ScriptContext") sc = game:GetService("ScriptContext")
wait(0.2) wait(0.2)
@ -14,7 +14,8 @@ if sc then
end end
sc:RegisterLibrary("Libraries/RbxUtility", "60595411") sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
sc:RegisterLibrary("Libraries/RbxStamper", "73157242") sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
return sc:LibraryRegistrationComplete() sc:LibraryRegistrationComplete()
else else
return print("failed to find script context, libraries did not load") print("failed to find script context, libraries did not load")
end end
return sc

View File

@ -6,21 +6,21 @@ deepakTestingPlace = 3569749
sc = game\GetService "ScriptContext" sc = game\GetService "ScriptContext"
tries = 0 tries = 0
while not sc and tries < 3 until sc or tries > 2
tries += 1 tries += 1
sc = game\GetService "ScriptContext" sc = game\GetService "ScriptContext"
wait 0.2 wait 0.2
if sc with sc do if sc
sc\RegisterLibrary "Libraries/RbxGui", "45284430" \RegisterLibrary "Libraries/RbxGui", "45284430"
sc\RegisterLibrary "Libraries/RbxGear", "45374389" \RegisterLibrary "Libraries/RbxGear", "45374389"
if game.PlaceId == deepakTestingPlace if game.PlaceId == deepakTestingPlace
sc\RegisterLibrary "Libraries/RbxStatus", "52177566" \RegisterLibrary "Libraries/RbxStatus", "52177566"
sc\RegisterLibrary "Libraries/RbxUtility", "60595411" \RegisterLibrary "Libraries/RbxUtility", "60595411"
sc\RegisterLibrary "Libraries/RbxStamper", "73157242" \RegisterLibrary "Libraries/RbxStamper", "73157242"
sc\LibraryRegistrationComplete! \LibraryRegistrationComplete!
else else
print "failed to find script context, libraries did not load" print "failed to find script context, libraries did not load"