Further improve formatting of corescripts

This commit is contained in:
Lewin Kelly 2023-06-03 17:51:33 +01:00
parent f247c89ce3
commit 9c28950b36
18 changed files with 319 additions and 345 deletions

View File

@ -5,7 +5,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -299,7 +299,7 @@ setCurrencyAmountAndType = (priceInRobux, priceInTix) ->
return false return false
if not currentCurrencyAmount? if currentCurrencyAmount == nil
return false return false
true true
@ -357,7 +357,7 @@ updateAfterBalanceText = (playerBalance, notRightBc) ->
-- check to see if we have enough of the desired currency to allow a purchase, if not we need to prompt user to buy robux -- check to see if we have enough of the desired currency to allow a purchase, if not we need to prompt user to buy robux
if not notRightBc if not notRightBc
if afterBalanceNumber < 0 and keyWord == "robux" if afterBalanceNumber < 0 and keyWord == "robux"
if not openBuyCurrencyWindowConnection? if openBuyCurrencyWindowConnection == nil
openBuyCurrencyWindowConnection = purchaseDialog.BodyFrame.AfterBalanceButton.MouseButton1Click\connect openBuyCurrencyWindow openBuyCurrencyWindowConnection = purchaseDialog.BodyFrame.AfterBalanceButton.MouseButton1Click\connect openBuyCurrencyWindow
purchaseDialog.BodyFrame.AfterBalanceButton.Text = "You need " .. purchaseDialog.BodyFrame.AfterBalanceButton.Text = "You need " ..
@ -400,7 +400,7 @@ canPurchaseItem = ->
currentProductInfo = game\GetService"MarketplaceService"\GetProductInfo currentAssetId currentProductInfo = game\GetService"MarketplaceService"\GetProductInfo currentAssetId
if not currentProductInfo? or not success if currentProductInfo == nil or not success
descText = "In-game sales are temporarily disabled. Please try again later." descText = "In-game sales are temporarily disabled. Please try again later."
return true, nil, nil, true, descText return true, nil, nil, true, descText

View File

@ -8,7 +8,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil

View File

@ -7,7 +7,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -465,7 +465,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
resetCameraRotateState! resetCameraRotateState!
if not lastPinchScale? -- first pinch move, just set up scale if lastPinchScale == nil -- first pinch move, just set up scale
if inputObject == firstTouch if inputObject == firstTouch
lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject firstTouch = inputObject
@ -517,7 +517,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
pinchGestureReceivedTouch inputObject pinchGestureReceivedTouch inputObject
if not cameraTouch? and not usedByThumbstick if cameraTouch == nil and not usedByThumbstick
cameraTouch = inputObject cameraTouch = inputObject
lastPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y lastPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y
-- lastTick = tick! -- lastTick = tick!

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil

View File

@ -7,7 +7,7 @@ return if not controlFrame
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -73,7 +73,7 @@ setUpListeners = (frameToListen) ->
killTip frameToListen killTip frameToListen
createSettingsButtonTip = (parent) -> createSettingsButtonTip = (parent) ->
if not parent? if parent == nil
parent = bottomLeftControl\FindFirstChild "SettingsButton" parent = bottomLeftControl\FindFirstChild "SettingsButton"

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -51,12 +51,12 @@ inCharTag = New "BoolValue"
hider = New "BoolValue" hider = New "BoolValue"
Name: "RobloxBuildTool" Name: "RobloxBuildTool"
if not config? if config == nil
config = New "Configuration", "PlayerStats" config = New "Configuration", "PlayerStats"
Parent: Figure Parent: Figure
myHealth = config\FindFirstChild "MaxHealth" myHealth = config\FindFirstChild "MaxHealth"
if not myHealth? if myHealth == nil
myHealth = New "NumberValue", "MaxHealth" myHealth = New "NumberValue", "MaxHealth"
Value: 100 Value: 100
Parent: config Parent: config
@ -75,7 +75,7 @@ myHealth.Changed\connect onMaxHealthChange
vPlayer = game.Players\GetPlayerFromCharacter script.Parent vPlayer = game.Players\GetPlayerFromCharacter script.Parent
dotGui = vPlayer.PlayerGui\FindFirstChild "DamageOverTimeGui" dotGui = vPlayer.PlayerGui\FindFirstChild "DamageOverTimeGui"
if not dotGui? if dotGui == nil
dotGui = New "BillboardGui", "DamageOverTimeGui" dotGui = New "BillboardGui", "DamageOverTimeGui"
Parent: vPlayer.PlayerGui Parent: vPlayer.PlayerGui
Adornee: script.Parent\FindFirstChild "Head" Adornee: script.Parent\FindFirstChild "Head"

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -241,10 +241,10 @@ presentDialogChoices = (talkingPart, dialogChoices) ->
return if not currentConversationDialog return if not currentConversationDialog
currentConversationPartner = talkingPart currentConversationPartner = talkingPart
sortedDialogChoices = {}
for _, obj in pairs dialogChoices sortedDialogChoices = [obj \
if obj\IsA "DialogChoice" for _, obj in pairs sortedDialogChoices \
table.insert sortedDialogChoices, obj when obj\IsA "DialogChoice"]
table.sort sortedDialogChoices, (a, b) -> a.Name < b.Name table.sort sortedDialogChoices, (a, b) -> a.Name < b.Name
@ -341,13 +341,9 @@ newChoice = (numberText) ->
TextWrap: true TextWrap: true
RobloxLocked: true RobloxLocked: true
frame.MouseEnter\connect -> frame.MouseEnter\connect -> highlightColor frame, currentTone!
highlightColor frame, currentTone! frame.MouseLeave\connect -> resetColor frame, currentTone!
frame.MouseLeave\connect -> frame.MouseButton1Click\connect -> selectChoice frame
resetColor frame, currentTone!
frame.MouseButton1Click\connect ->
selectChoice frame
frame frame
initialize = (parent) -> initialize = (parent) ->

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -1400,8 +1400,8 @@ t.CreateScrollingFrame = (orderList, scrollStyle) ->
xOffset = yOffset = 0 xOffset = yOffset = 0
if guiObjects[1] if guiObjects[1]
yOffset = math.ceil math.floor(math.fmod(totalPixelsY, guiObjects[1].AbsoluteSize.X)) / 2 yOffset = math.ceil math.floor(math.fmod totalPixelsY, guiObjects[1].AbsoluteSize.X) / 2
xOffset = math.ceil math.floor(math.fmod(totalPixelsX, guiObjects[1].AbsoluteSize.Y)) / 2 xOffset = math.ceil math.floor(math.fmod totalPixelsX, guiObjects[1].AbsoluteSize.Y) / 2
for i, child in ipairs guiObjects for i, child in ipairs guiObjects
@ -2369,14 +2369,8 @@ t.CreateSetPanel = (userIdsForSets, objectSelected, dialogClosed, size, position
* New "Frame", "SetPanel" * New "Frame", "SetPanel"
Active: true Active: true
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: if position Position: position or UDim2.new 0.2, 29, 0.1, 24
position Size: size or UDim2.new 0.6, -58, 0.64, 0
else
UDim2.new 0.2, 29, 0.1, 24
Size: if size
size
else
UDim2.new 0.6, -58, 0.64, 0
Style: Enum.FrameStyle.RobloxRound Style: Enum.FrameStyle.RobloxRound
ZIndex: 6 ZIndex: 6
Parent: setGui Parent: setGui
@ -2466,10 +2460,7 @@ t.CreateSetPanel = (userIdsForSets, objectSelected, dialogClosed, size, position
createSetButton = (text) -> createSetButton = (text) ->
New "TextButton" New "TextButton"
Text: if text Text: text or ""
text
else
""
AutoButtonColor: false AutoButtonColor: false
BackgroundTransparency: 1 BackgroundTransparency: 1
BackgroundColor3: Color3.new 1, 1, 1 BackgroundColor3: Color3.new 1, 1, 1
@ -2931,10 +2922,10 @@ t.CreateSetPanel = (userIdsForSets, objectSelected, dialogClosed, size, position
if newUserData and #newUserData > 2 if newUserData and #newUserData > 2
-- start at #3 to skip over My Decals and My Models for each account -- start at #3 to skip over My Decals and My Models for each account
for category = 3, #newUserData for category = 3, #newUserData
if newUserData[category].Name == "High Scalability" -- we want high scalability parts to show first table.insert userData, if newUserData[category].Name == "High Scalability" -- we want high scalability parts to show first
table.insert userData, 1, newUserData[category] 1, newUserData[category]
else else
table.insert userData, newUserData[category] newUserData[category]
if userData if userData
@ -2975,10 +2966,7 @@ t.CreateTerrainMaterialSelector = (size, position) ->
local selectedButton local selectedButton
frame = New "Frame", "TerrainMaterialSelector" frame = New "Frame", "TerrainMaterialSelector"
Size: if size Size: size or UDim2.new 0, 245, 0, 230
size
else
UDim2.new 0, 245, 0, 230
BorderSizePixel: 0 BorderSizePixel: 0
BackgroundColor3: Color3.new 0, 0, 0 BackgroundColor3: Color3.new 0, 0, 0
Active: true Active: true
@ -3186,15 +3174,8 @@ t.CreateLoadingFrame = (name, size, position) ->
loadingFrame = New "Frame", "LoadingFrame" loadingFrame = New "Frame", "LoadingFrame"
Style: Enum.FrameStyle.RobloxRound Style: Enum.FrameStyle.RobloxRound
Size: if size Size: size or UDim2.new 0, 300, 0, 160
size Position: position or UDim2.new 0.5, -150, 0.5, -80
else
UDim2.new 0, 300, 0, 160
Position: if position
position
else
UDim2.new 0.5, -150, 0.5, -80
* New "TextLabel", "loadingName" * New "TextLabel", "loadingName"
BackgroundTransparency: 1 BackgroundTransparency: 1

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -1710,9 +1710,9 @@ if LoadLibrary
spinnerImage = New "ImageLabel", "Spinner#{spinnerNum}" spinnerImage = New "ImageLabel", "Spinner#{spinnerNum}"
Size: UDim2.new 0, 16, 0, 16 Size: UDim2.new 0, 16, 0, 16
Position: UDim2.new( Position: UDim2.new(
0.5 + 0.3 * math.cos(math.rad(45 * spinnerNum)), 0.5 + 0.3 * math.cos(math.rad 45 * spinnerNum),
-8, -8,
0.5 + 0.3 * math.sin(math.rad(45 * spinnerNum)), 0.5 + 0.3 * math.sin(math.rad 45 * spinnerNum),
-8 -8
) )
BackgroundTransparency: 1 BackgroundTransparency: 1

View File

@ -156,7 +156,7 @@ MOUSE_DRAG_DISTANCE = 15
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -318,42 +318,36 @@ ScreenGui = New "Frame", "PlayerListScreen"
BackgroundTransparency: 1 BackgroundTransparency: 1
Parent: script.Parent Parent: script.Parent
MainFrame = New "Frame", "LeaderBoardFrame" * New "Frame", "LeaderBoardFrame"
Position: UDim2.new 1, -150, 0.005, 0 Position: UDim2.new 1, -150, 0.005, 0
Size: UDim2.new 0, 150, 0, 800 Size: UDim2.new 0, 150, 0, 800
BackgroundTransparency: 1 BackgroundTransparency: 1
Parent: ScreenGui
--frame used for expanding leaderstats when frame is 'focused' --frame used for expanding leaderstats when frame is 'focused'
FocusFrame = New "Frame", "FocusFrame" * New "Frame", "FocusFrame"
Position: UDim2.new 0, 0, 0, 0 Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 0, 100 Size: UDim2.new 1, 0, 0, 100
BackgroundTransparency: 1 BackgroundTransparency: 1
Active: true Active: true
Parent: MainFrame
-- HEADER -- HEADER
HeaderFrame = New "Frame", "Header" * New "Frame", "Header"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0, 0 Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 0.07, 0 Size: UDim2.new 1, 0, 0.07, 0
Parent: MainFrame
* MakeBackgroundGuiObj "http://www.roblox.com/asset/?id=94692054" * MakeBackgroundGuiObj "http://www.roblox.com/asset/?id=94692054"
HeaderFrameHeight = HeaderFrame.Size.Y.Scale * New "ImageButton", "MaximizeButton"
MaximizeButton = New "ImageButton", "MaximizeButton"
Active: true Active: true
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0, 0 Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 1, 0 Size: UDim2.new 1, 0, 1, 0
Parent: HeaderFrame
HeaderName = New "TextLabel", "PlayerName" * New "TextLabel", "PlayerName"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0.01, 0 Position: UDim2.new 0, 0, 0.01, 0
Size: UDim2.new 0.98, 0, 0.38, 0 Size: UDim2.new 0.98, 0, 0.38, 0
Parent: HeaderFrame
Font: "ArialBold" Font: "ArialBold"
Text: LocalPlayer.Name Text: LocalPlayer.Name
FontSize: "Size24" FontSize: "Size24"
@ -364,11 +358,10 @@ HeaderName = New "TextLabel", "PlayerName"
TextXAlignment: "Right" TextXAlignment: "Right"
TextYAlignment: "Center" TextYAlignment: "Center"
HeaderScore = New "TextLabel", "PlayerScore" * New "TextLabel", "PlayerScore"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0.4, 0 Position: UDim2.new 0, 0, 0.4, 0
Size: UDim2.new 0.98, 0, 0, 30 Size: UDim2.new 0.98, 0, 0, 30
Parent: HeaderFrame
Font: "ArialBold" Font: "ArialBold"
Text: "" Text: ""
FontSize: "Size24" FontSize: "Size24"
@ -378,6 +371,20 @@ HeaderScore = New "TextLabel", "PlayerScore"
TextStrokeTransparency: 1 TextStrokeTransparency: 1
TextXAlignment: "Right" TextXAlignment: "Right"
{
LeaderBoardFrame: MainFrame
MainFrame:
:FocusFrame
Header: HeaderFrame
HeaderFrame:
:MaximizeButton
PlayerName: HeaderName
PlayerScore: HeaderScore
:BottomShiftFrame
} = ScreenGui
HeaderFrameHeight = HeaderFrame.Size.Y.Scale
-- BOTTOM -- BOTTOM
--used for shifting bottom frame for mouse over effects --used for shifting bottom frame for mouse over effects
BottomShiftFrame = New "Frame", "BottomShiftFrame" BottomShiftFrame = New "Frame", "BottomShiftFrame"
@ -386,7 +393,7 @@ BottomShiftFrame = New "Frame", "BottomShiftFrame"
Size: UDim2.new 1, 0, 1, 0 Size: UDim2.new 1, 0, 1, 0
Parent: MainFrame Parent: MainFrame
BottomFrame = New "Frame", "Bottom" * New "Frame", "Bottom"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0.07, 0 Position: UDim2.new 0, 0, 0.07, 0
Size: UDim2.new 1, 0, 0.03, 0 Size: UDim2.new 1, 0, 0.03, 0
@ -394,21 +401,27 @@ BottomFrame = New "Frame", "Bottom"
* MakeBackgroundGuiObj "http://www.roblox.com/asset/?id=94754966" * MakeBackgroundGuiObj "http://www.roblox.com/asset/?id=94754966"
ExtendButton = New "ImageButton", "bigbutton" * New "ImageButton", "bigbutton"
Active: true Active: true
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0, 0 Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 1.5, 0 Size: UDim2.new 1, 0, 1.5, 0
ZIndex: 3 ZIndex: 3
Parent: BottomFrame
ExtendTab = New "ImageButton", "extendTab" * New "ImageButton", "extendTab"
Active: true Active: true
BackgroundTransparency: 1 BackgroundTransparency: 1
Image: "http://www.roblox.com/asset/?id=94692731" Image: "http://www.roblox.com/asset/?id=94692731"
Position: UDim2.new 0.608, 0, 0.3, 0 Position: UDim2.new 0.608, 0, 0.3, 0
Size: UDim2.new 0.3, 0, 0.7, 0 Size: UDim2.new 0.3, 0, 0.7, 0
Parent: BottomFrame
{
Bottom: BottomFrame
Bottom:
bigbutton: ExtendButton
extendTab: ExtendTab
} = BottomShiftFrame
TopClipFrame = New "Frame", "ListFrame" TopClipFrame = New "Frame", "ListFrame"
BackgroundTransparency: 1 BackgroundTransparency: 1
@ -417,32 +430,37 @@ TopClipFrame = New "Frame", "ListFrame"
Parent: MainFrame Parent: MainFrame
ClipsDescendants: true ClipsDescendants: true
BottomClipFrame = New "Frame", "BottomFrame" * New "Frame", "BottomFrame"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, -0.8, 0 Position: UDim2.new 0, 0, -0.8, 0
Size: UDim2.new 1, 0, 1, 0 Size: UDim2.new 1, 0, 1, 0
Parent: TopClipFrame
ClipsDescendants: true ClipsDescendants: true
ScrollBarFrame = New "Frame", "ScrollBarFrame" * New "Frame", "ScrollBarFrame"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0.987, 0, 0.8, 0 Position: UDim2.new 0.987, 0, 0.8, 0
Size: UDim2.new 0.01, 0, 0.2, 0 Size: UDim2.new 0.01, 0, 0.2, 0
Parent: BottomClipFrame
ScrollBar = New "Frame", "ScrollBar" * New "Frame", "ScrollBar"
BackgroundTransparency: 0 BackgroundTransparency: 0
BackgroundColor3: Color3.new 0.2, 0.2, 0.2 BackgroundColor3: Color3.new 0.2, 0.2, 0.2
Position: UDim2.new 0, 0, 0, 0 Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 0.5, 0 Size: UDim2.new 1, 0, 0.5, 0
ZIndex: 5 ZIndex: 5
Parent: ScrollBarFrame
ListFrame = New "Frame", "SubFrame" * New "Frame", "SubFrame"
BackgroundTransparency: 1 BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0.8, 0 Position: UDim2.new 0, 0, 0.8, 0
Size: UDim2.new 1, 0, 1, 0 Size: UDim2.new 1, 0, 1, 0
Parent: BottomClipFrame
{
BottomFrame: BottomClipFrame
BottomClipFrame:
:ScrollBarFrame
ScrollBarFrame:
:ScrollBar
SubFrame: ListFrame
} = TopClipFrame
PopUpClipFrame = New "Frame", "PopUpFrame", PopUpClipFrame = New "Frame", "PopUpFrame",
BackgroundTransparency: 1 BackgroundTransparency: 1
@ -461,10 +479,10 @@ PopUpPanelTemplate = New "Frame", "Panel"
Parent: PopUpClipFrame Parent: PopUpClipFrame
StatTitles = New "Frame", "StatTitles", StatTitles = New "Frame", "StatTitles",
BackgroundTransparency: 1, BackgroundTransparency: 1
Position: UDim2.new 0, 0, 1, -10, Position: UDim2.new 0, 0, 1, -10
Size: UDim2.new 1, 0, 0, 0, Size: UDim2.new 1, 0, 0, 0
Parent: HeaderFrame, Parent: HeaderFrame
IsMinimized = Instance.new "BoolValue" IsMinimized = Instance.new "BoolValue"
IsMaximized = Instance.new "BoolValue" IsMaximized = Instance.new "BoolValue"
@ -1209,14 +1227,12 @@ OnFriendRefuseButtonSelect = ->
PlayerSortFunction = (a, b) -> PlayerSortFunction = (a, b) ->
-- prevents flipping out leaderboard -- prevents flipping out leaderboard
if a["Score"] == b["Score"] if a["Score"] == b["Score"]
return a["Player"].Name\upper! < b["Player"].Name\upper! a["Player"].Name\upper! < b["Player"].Name\upper!
elseif not a["Score"]
if not a["Score"] false
return false elseif not b["Score"]
true
if not b["Score"] else
return true
a["Score"] < b["Score"] a["Score"] < b["Score"]
--------------------------------- ---------------------------------
@ -2626,13 +2642,12 @@ TeamSortFunc = (a, b) ->
team team entry to sum the scores of team team entry to sum the scores of
--]] --]]
AddTeamScores = (team) -> AddTeamScores = (team) ->
for j = 1, #ScoreNames for i in *ScoreNames
i = ScoreNames[j]
tscore = 0 tscore = 0
for _, j in ipairs team["MyPlayers"] for _, j in ipairs team["MyPlayers"]
tval = j["Player"]\FindFirstChild "leaderstats" and j["Player"].leaderstats\FindFirstChild i["Name"] tval = j["Player"]\FindFirstChild "leaderstats" and j["Player"].leaderstats\FindFirstChild i["Name"]
if tval and not tval\IsA "StringValue" if tval and not tval\IsA "StringValue"
tscore += GetScoreValue (j["Player"].leaderstats)[i["Name"]] tscore += GetScoreValue j["Player"].leaderstats[i["Name"]]
if team["Frame"]\FindFirstChild i["Name"] if team["Frame"]\FindFirstChild i["Name"]
--team['Frame'][i['Name'] ].Size = UDim2.new(1 - (ScrollBarFrame.Size.X.Scale * 2),- ((j-1) * SpacingPerStat),1,0) --team['Frame'][i['Name'] ].Size = UDim2.new(1 - (ScrollBarFrame.Size.X.Scale * 2),- ((j-1) * SpacingPerStat),1,0)
@ -2781,35 +2796,38 @@ InsertTeamFrame = (nteam) ->
AddingFrameLock = true AddingFrameLock = true
--for _,i in pairs TeamFrames --for _,i in pairs TeamFrames
with n = nentry["Frame"]
nentry = {} nentry = {}
nentry["MyTeam"] = nteam nentry["MyTeam"] = nteam
nentry["MyPlayers"] = {} nentry["MyPlayers"] = {}
nentry["Frame"] = MiddleTemplate\Clone! nentry["Frame"] = MiddleTemplate\Clone!
WaitForChild(WaitForChild(nentry["Frame"], "TitleFrame"), "Title").Text = nteam.Name WaitForChild(WaitForChild(nentry["Frame"], "TitleFrame"), "Title").Text = nteam.Name
nentry["Frame"].TitleFrame.Title.Font = "ArialBold" .TitleFrame.Title.Font = "ArialBold"
nentry["Frame"].TitleFrame.Title.FontSize = "Size18" .TitleFrame.Title.FontSize = "Size18"
nentry["Frame"].TitleFrame.Position = UDim2.new( .TitleFrame.Position = UDim2.new(
nentry["Frame"].TitleFrame.Position.X.Scale, .TitleFrame.Position.X.Scale,
nentry["Frame"].TitleFrame.Position.X.Offset, .TitleFrame.Position.X.Offset,
0.1, 0.1,
0 0
) )
nentry["Frame"].TitleFrame.Size = UDim2.new( .TitleFrame.Size = UDim2.new(
nentry["Frame"].TitleFrame.Size.X.Scale, .TitleFrame.Size.X.Scale,
nentry["Frame"].TitleFrame.Size.X.Offset, .TitleFrame.Size.X.Offset,
0.8, 0.8,
0 0
) )
nentry["Frame"].Position = UDim2.new(1, 0, (#MiddleFrames * nentry["Frame"].Size.Y.Scale), 0) .Position = UDim2.new(1, 0, (#MiddleFrames * .Size.Y.Scale), 0)
WaitForChild(nentry["Frame"], "ClickListener").MouseButton1Down\connect (nx, ny) -> WaitForChild(n, "ClickListener").MouseButton1Down\connect (nx, ny) ->
StartDrag nentry, nx, ny StartDrag nentry, nx, ny
nentry["Frame"].ClickListener.BackgroundColor3 = nteam.TeamColor.Color .ClickListener.BackgroundColor3 = nteam.TeamColor.Color
nentry["Frame"].ClickListener.BackgroundTransparency = 0.7 .ClickListener.BackgroundTransparency = 0.7
nentry["Frame"].ClickListener.AutoButtonColor = false .ClickListener.AutoButtonColor = false
AddId += 1 AddId += 1
nentry["ID"] = AddId nentry["ID"] = AddId
nentry["AutoHide"] = false nentry["AutoHide"] = false
if nteam\FindFirstChild "AutoHide" if nteam\FindFirstChild "AutoHide"
nentry["AutoHide"] = true nentry["AutoHide"] = true
@ -2826,9 +2844,9 @@ InsertTeamFrame = (nteam) ->
nentry["IsHidden"] = false nentry["IsHidden"] = false
if not nentry["AutoHide"] or #nentry["MyPlayers"] > 0 if not nentry["AutoHide"] or #nentry["MyPlayers"] > 0
nentry["Frame"].Parent = ListFrame .Parent = ListFrame
nentry["Frame"]\TweenPosition( nentry["Frame"]\TweenPosition(
UDim2.new(0.5, 0, (#MiddleFrames * nentry["Frame"].Size.Y.Scale), 0), UDim2.new(0.5, 0, (#MiddleFrames * .Size.Y.Scale), 0),
"Out", "Out",
"Linear", "Linear",
BASE_TWEEN, BASE_TWEEN,
@ -2837,7 +2855,7 @@ InsertTeamFrame = (nteam) ->
AddMiddleBGFrame! AddMiddleBGFrame!
else else
nentry["IsHidden"] = true nentry["IsHidden"] = true
nentry["Frame"].Parent = nil .Parent = nil
table.insert TeamFrames, nentry table.insert TeamFrames, nentry
UpdateMinimize! UpdateMinimize!

View File

@ -41,7 +41,7 @@ makePopupInvisible = ->
makeFriend = (fromPlayer, toPlayer) -> makeFriend = (fromPlayer, toPlayer) ->
popup = script.Parent\FindFirstChild "Popup" popup = script.Parent\FindFirstChild "Popup"
return if not popup? -- there is no popup! return if popup == nil -- there is no popup!
return if popup.Visible -- currently popping something, abort! return if popup.Visible -- currently popping something, abort!
return if friendRequestBlacklist[fromPlayer] -- previously cancelled friend request, we don't want it! return if friendRequestBlacklist[fromPlayer] -- previously cancelled friend request, we don't want it!

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil

View File

@ -9,7 +9,7 @@ return if game.CoreGui.Version < 3
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil

View File

@ -101,10 +101,7 @@ firstInstanceOfLoadout = false
inventory = {} inventory = {}
gearSlots = {} gearSlots = ["empty" for _ = 1, maxNumLoadoutItems]
for i = 1, maxNumLoadoutItems
gearSlots[i] = "empty"
backpackWasOpened = false backpackWasOpened = false
--- End Locals --- End Locals
@ -152,17 +149,17 @@ removeGear = (gear) ->
if emptySlot if emptySlot
with gearSlots[emptySlot] with g = gearSlots[emptySlot].GearReference.Value
if .GearReference.Value if g
if .GearReference.Value.Parent == game.Players.LocalPlayer.Character -- if we currently have this equipped, unequip it if .Parent == game.Players.LocalPlayer.Character -- if we currently have this equipped, unequip it
.GearReference.Value.Parent = game.Players.LocalPlayer.Backpack .Parent = game.Players.LocalPlayer.Backpack
if .GearReference.Value\IsA"HopperBin" and if \IsA"HopperBin" and
.GearReference.Value.Active .Active
-- this is an active hopperbin -- this is an active hopperbin
.GearReference.Value\Disable! \Disable!
.GearReference.Value.Active = false .Active = false
gearSlots[emptySlot] = "empty" gearSlots[emptySlot] = "empty"
@ -171,9 +168,7 @@ removeGear = (gear) ->
--[[gear\TweenSizeAndPosition(UDim2.new 0,0,0,0, --[[gear\TweenSizeAndPosition(UDim2.new 0,0,0,0,
UDim2.new(gear.Position.X.Scale + centerizeX,gear.Position.X.Offset,gear.Position.Y.Scale + centerizeY,gear.Position.Y.Offset), UDim2.new(gear.Position.X.Scale + centerizeX,gear.Position.X.Offset,gear.Position.Y.Scale + centerizeY,gear.Position.Y.Offset),
Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)]] Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)]]
delay 0, -> delay 0, -> gear\remove!
gear\remove!
Spawn -> Spawn ->
while backpackIsOpen! while backpackIsOpen!
@ -184,6 +179,7 @@ removeGear = (gear) ->
for i in *gearSlots for i in *gearSlots
if i ~= "empty" if i ~= "empty"
allEmpty = false allEmpty = false
break
if allEmpty if allEmpty
if #player.Backpack\GetChildren! < 1 if #player.Backpack\GetChildren! < 1
@ -218,10 +214,9 @@ insertGear = (gear, addToSlot) ->
for i = start, pos + 1, -1 for i = start, pos + 1, -1
gearSlots[i] = gearSlots[i - 1] gearSlots[i] = gearSlots[i - 1]
gearSlots[i].SlotNumber.Text \ gearSlots[i].SlotNumber.Text = \
= gearSlots[i].SlotNumberDownShadow.Text \ gearSlots[i].SlotNumberDownShadow.Text = \
= gearSlots[i].SlotNumberUpShadow.Text \ gearSlots[i].SlotNumberUpShadow.Text = if i == 10
= if i == 10
"0" "0"
else else
i i
@ -236,8 +231,8 @@ insertGear = (gear, addToSlot) ->
gear.SlotNumberUpShadow.Text = posString gear.SlotNumberUpShadow.Text = posString
else -- tenth gear doesn't follow mathematical pattern :( else -- tenth gear doesn't follow mathematical pattern :(
gear.SlotNumber.Text = "0" gear.SlotNumber.Text = \
gear.SlotNumberDownShadow.Text = "0" gear.SlotNumberDownShadow.Text = \
gear.SlotNumberUpShadow.Text = "0" gear.SlotNumberUpShadow.Text = "0"
gear.Visible = true gear.Visible = true
@ -262,7 +257,7 @@ checkToolAncestry = (child, parent) ->
if child\IsA"Tool" or child\IsA "HopperBin" if child\IsA"Tool" or child\IsA "HopperBin"
for i in *gearSlots for i in *gearSlots
if i ~= "empty" and i.GearReference.Value == child if i ~= "empty" and i.GearReference.Value == child
if not parent? if parent == nil
i.Kill.Value = true i.Kill.Value = true
return false return false
elseif child.Parent == player.Character elseif child.Parent == player.Character
@ -295,7 +290,7 @@ normalizeButton = (button, speed) ->
return if not button.Parent return if not button.Parent
moveSpeed = speed moveSpeed = speed
if not moveSpeed? or type(moveSpeed) ~= "number" if moveSpeed == nil or type(moveSpeed) ~= "number"
moveSpeed = guiTweenSpeed / 5 moveSpeed = guiTweenSpeed / 5
if button\FindFirstChild "Highlight" if button\FindFirstChild "Highlight"
@ -374,7 +369,7 @@ toolSwitcher = (numKey) ->
return if not gearSlots[numKey] return if not gearSlots[numKey]
physGear = gearSlots[numKey].GearReference.Value physGear = gearSlots[numKey].GearReference.Value
return if not physGear? return if physGear == nil
removeAllEquippedGear physGear -- we don't remove this gear, as then we get a double switcheroo removeAllEquippedGear physGear -- we don't remove this gear, as then we get a double switcheroo
@ -422,7 +417,7 @@ activateGear = (num) ->
else else
tonumber num tonumber num
return if not numKey? return if numKey == nil
if gearSlots[numKey] ~= "empty" if gearSlots[numKey] ~= "empty"
toolSwitcher numKey toolSwitcher numKey

View File

@ -5,7 +5,7 @@ t = {}
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -213,7 +213,7 @@ JsonReader.New = (s) =>
JsonReader.Read ==> JsonReader.Read ==>
@\SkipWhiteSpace! @\SkipWhiteSpace!
peek = @\Peek! peek = @\Peek!
return if not peek? return if peek == nil
error string.format "Nil string: '%s'", @\All! error string.format "Nil string: '%s'", @\All!
elseif peek == "{" elseif peek == "{"
@\ReadObject! @\ReadObject!
@ -261,7 +261,7 @@ JsonReader.ReadNumber ==>
peek = @\Peek! peek = @\Peek!
result = tonumber result result = tonumber result
if not result? if result == nil
error string.format "Invalid number: '%s'", result error string.format "Invalid number: '%s'", result
else else
return result return result
@ -451,10 +451,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
-- container for all adornments, passed back to user -- container for all adornments, passed back to user
selectionContainer = New "Model", "SelectionContainer" selectionContainer = New "Model", "SelectionContainer"
Archivable: false Archivable: false
Parent: if selectionParent Parent: selectiorParent or game.Workspace
selectionParent
else
game.Workspace
local updateSelection -- function we return to allow user to update selection local updateSelection -- function we return to allow user to update selection
local currentKeepAliveTag -- a tag that determines whether adorns should be destroyed local currentKeepAliveTag -- a tag that determines whether adorns should be destroyed

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -188,8 +188,7 @@ setSeatEnabledStatus = (model, isEnabled) ->
autoAlignToFace = (parts) -> autoAlignToFace = (parts) ->
if aatf = parts\FindFirstChild "AutoAlignToFace" if aatf = parts\FindFirstChild "AutoAlignToFace"
aatf.Value return aatf.Value
else
false false
@ -372,24 +371,16 @@ getMouseTargetCFrame = (targetPart) -> with targetPart
isBlocker = (part) -> -- returns whether or not we want to cancel the stamp because we're blocked by this part isBlocker = (part) -> -- returns whether or not we want to cancel the stamp because we're blocked by this part
if not part if (not part) or
return false (not part.Parent) or
part\FindFirstChild "Humanoid"
if not part.Parent
return false
if part\FindFirstChild "Humanoid"
return false
if part\FindFirstChild"RobloxStamper" or part\FindFirstChild "RobloxModel"
return true
if part\IsA"Part" and not part.CanCollide
return false
if part == game.Lighting
return false
false
elseif part\FindFirstChild"RobloxStamper" or part\FindFirstChild "RobloxModel"
true
elseif (part\IsA"Part" and not part.CanCollide) or part == game.Lighting
false
else
isBlocker part.Parent isBlocker part.Parent
-- helper function to determine if a character can be pushed upwards by a certain amount -- helper function to determine if a character can be pushed upwards by a certain amount
@ -463,9 +454,10 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
return admissibleConfig, targetConfig return admissibleConfig, targetConfig
mouseHitInWorld = Vector3.new 0, 0, 0 mouseHitInWorld = Vector3.new if Mouse
if Mouse Mouse.Hit.x, Mouse.Hit.y, Mouse.Hit.z
mouseHitInWorld = Vector3.new Mouse.Hit.x, Mouse.Hit.y, Mouse.Hit.z else
0, 0, 0
local cellPos local cellPos
@ -505,7 +497,7 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
if Mouse if Mouse
-- DON'T WANT THIS IN TERMS OF THE MODEL CFRAME! (.TargetSurface is in terms of the part CFrame, so this would break, right? [HotThoth]) -- DON'T WANT THIS IN TERMS OF THE MODEL CFRAME! (.TargetSurface is in terms of the part CFrame, so this would break, right? [HotThoth])
-- (ideally, we would want to make the Mouse.TargetSurface a model-targetsurface instead, but for testing will be using the converse) -- (ideally, we would want to make the Mouse.TargetSurface a model-targetsurface instead, but for testing will be using the converse)
--targetVectorInWorld = targetCFrame\vectorToWorldSpace(Vector3.FromNormalId(Mouse.TargetSurface)) --targetVectorInWorld = targetCFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface
targetVectorInWorld = targetPart.CFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface -- better, but model cframe would be best targetVectorInWorld = targetPart.CFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface -- better, but model cframe would be best
--[[if targetPart.Parent\IsA "Model" --[[if targetPart.Parent\IsA "Model"
hitFace = modelTargetSurface(targetPart.Parent, Mouse.Hit.p, game.Workspace.CurrentCamera.CoordinateFrame.p) -- best, if you get it right hitFace = modelTargetSurface(targetPart.Parent, Mouse.Hit.p, game.Workspace.CurrentCamera.CoordinateFrame.p) -- best, if you get it right
@ -983,16 +975,16 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
tempCFrame = CFrame.new HighScalabilityLine.Start, HighScalabilityLine.Start + line tempCFrame = CFrame.new HighScalabilityLine.Start, HighScalabilityLine.Start + line
-- then zero out whichever is the smaller component -- then zero out whichever is the smaller component
yAxis = tempCFrame\vectorToWorldSpace(Vector3.new(0, 1, 0)) yAxis = tempCFrame\vectorToWorldSpace Vector3.new 0, 1, 0
xAxis = tempCFrame\vectorToWorldSpace(Vector3.new(1, 0, 0)) xAxis = tempCFrame\vectorToWorldSpace Vector3.new 1, 0, 0
xComp = xAxis\Dot line2 xComp = xAxis\Dot line2
yComp = yAxis\Dot line2 yComp = yAxis\Dot line2
if math.abs(yComp) > math.abs xComp line2 -= if math.abs(yComp) > math.abs xComp
line2 -= xAxis * xComp xAxis * xComp
else else
line2 -= yAxis * yComp yAxis * yComp
HighScalabilityLine.InternalLine = line2 HighScalabilityLine.InternalLine = line2
@ -1018,7 +1010,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
else else
boxSize = tempCFrame\vectorToObjectSpace line + line2 + line3 boxSize = tempCFrame\vectorToObjectSpace line + line2 + line3
HighScalabilityLine.AdornPart.Size = Vector3.new(4, 4, 4) + HighScalabilityLine.AdornPart.Size = Vector3.new(4, 4, 4) +
Vector3.new(math.abs(boxSize.X), math.abs(boxSize.Y), math.abs(boxSize.Z)) Vector3.new(math.abs(boxSize.X), math.abs(boxSize.Y), math.abs boxSize.Z)
HighScalabilityLine.AdornPart.CFrame = tempCFrame + tempCFrame\vectorToWorldSpace boxSize / 2 HighScalabilityLine.AdornPart.CFrame = tempCFrame + tempCFrame\vectorToWorldSpace boxSize / 2
@ -1035,7 +1027,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
HighScalabilityLine.Adorn.Parent = gui HighScalabilityLine.Adorn.Parent = gui
if not gui? -- we are in studio if gui == nil -- we are in studio
gui = game\GetService "CoreGui" gui = game\GetService "CoreGui"
if (HighScalabilityLine.Dimensions == 1 and line.magnitude > 3) or HighScalabilityLine.Dimensions > 1 -- don't show if mouse hasn't moved enough if (HighScalabilityLine.Dimensions == 1 and line.magnitude > 3) or HighScalabilityLine.Dimensions > 1 -- don't show if mouse hasn't moved enough
HighScalabilityLine.Adorn.Parent = gui HighScalabilityLine.Adorn.Parent = gui
@ -1068,14 +1060,13 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
numRotations = 0 -- update this according to how many rotations you need to get it to target surface numRotations = 0 -- update this according to how many rotations you need to get it to target surface
if autoAlignToFace(stampData.CurrentParts) and targetSurface ~= 1 and targetSurface ~= 4 -- pre-rotate the flag or portrait so it's aligned correctly if autoAlignToFace(stampData.CurrentParts) and targetSurface ~= 1 and targetSurface ~= 4 -- pre-rotate the flag or portrait so it's aligned correctly
numRotations = if targetSurface == 3 numRotations = (
0 - gInitial90DegreeRotations + autoAlignToFace stampData.CurrentParts switch targetSurface
elseif targetSurface == 0 when 3 then 0
2 - gInitial90DegreeRotations + autoAlignToFace stampData.CurrentParts when 0 then 2
elseif targetSurface == 5 when 5 then 3
3 - gInitial90DegreeRotations + autoAlignToFace stampData.CurrentParts when 2 then 1
elseif targetSurface == 2 ) - gInitial90DegreeRotations + autoAlignToFace stampData.CurrentParts
1 - gInitial90DegreeRotations + autoAlignToFace stampData.CurrentParts
ry = math.pi / 2 ry = math.pi / 2
@ -1543,14 +1534,16 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
if checkHighScalabilityStamp -- check to see if cell is in region, if not we'll skip set if checkHighScalabilityStamp -- check to see if cell is in region, if not we'll skip set
if allowedStampRegion if allowedStampRegion
cellPos = cellCenterToWorld game.Workspace.Terrain, cellPos.X, cellPos.Y, cellPos.Z cellPos = cellCenterToWorld game.Workspace.Terrain, cellPos.X, cellPos.Y, cellPos.Z
if (cellPos.X + 2 > allowedStampRegion.CFrame.p.X + allowedStampRegion.Size.X / 2) or with allowedStampRegion
(cellPos.X - 2 < allowedStampRegion.CFrame.p.X - allowedStampRegion.Size.X / 2) or if (cellPos.X + 2 > .CFrame.p.X + .Size.X / 2) or
(cellPos.Y + 2 > allowedStampRegion.CFrame.p.Y + allowedStampRegion.Size.Y / 2) or (cellPos.X - 2 < .CFrame.p.X - .Size.X / 2) or
(cellPos.Y - 2 < allowedStampRegion.CFrame.p.Y - allowedStampRegion.Size.Y / 2) or (cellPos.Y + 2 > .CFrame.p.Y + .Size.Y / 2) or
(cellPos.Z + 2 > allowedStampRegion.CFrame.p.Z + allowedStampRegion.Size.Z / 2) or (cellPos.Y - 2 < .CFrame.p.Y - .Size.Y / 2) or
(cellPos.Z - 2 < allowedStampRegion.CFrame.p.Z - allowedStampRegion.Size.Z / 2) (cellPos.Z + 2 > .CFrame.p.Z + .Size.Z / 2) or
(cellPos.Z - 2 < .CFrame.p.Z - .Size.Z / 2)
canSetCell = false canSetCell = false
return canSetCell return canSetCell
false false
@ -2071,11 +2064,11 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
setSeatEnabledStatus stampData.CurrentParts, true setSeatEnabledStatus stampData.CurrentParts, true
with stampData with stampData
.TransparencyTable = nil .TransparencyTable = \
.ArchivableTable = nil .ArchivableTable = \
.MaterialTable = nil .MaterialTable = \
.CanCollideTable = nil .CanCollideTable = \
.AnchoredTable = nil .AnchoredTable = \
.SurfaceTypeTable = nil .SurfaceTypeTable = nil
-- ...and tag all inserted models for subsequent origin identification -- ...and tag all inserted models for subsequent origin identification
@ -2103,8 +2096,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-- clear out more data -- clear out more data
stampData.DisabledScripts = nil stampData.DisabledScripts = \
stampData.Dragger = nil stampData.Dragger = \
stampData.CurrentParts = nil stampData.CurrentParts = nil
try try
@ -2113,9 +2106,9 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
true true
pauseStamper = -> pauseStamper = ->
for i in *mouseCons -- stop the mouse from doing anything for i = 1, #mouseCons -- stop the mouse from doing anything
i\disconnect! mouseCons[i]\disconnect!
i = nil mouseCons[i] = nil
mouseCons = {} mouseCons = {}
@ -2189,10 +2182,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
stampData.ErrorBox = errorBox stampData.ErrorBox = errorBox
clone.Parent = if stampInModel clone.Parent = stampInModel or game.Workspace
stampInModel
else
game.Workspace
if clone\FindFirstChild "ClusterMaterial", true -- extract all info from vector if clone\FindFirstChild "ClusterMaterial", true -- extract all info from vector
clusterMaterial = clone\FindFirstChild "ClusterMaterial", true clusterMaterial = clone\FindFirstChild "ClusterMaterial", true
@ -2314,9 +2304,9 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-- High-Scalability and with the new model orientation setting methods (model\ResetOrientationToIdentity!) [HotThoth] -- High-Scalability and with the new model orientation setting methods (model\ResetOrientationToIdentity!) [HotThoth]
control.Destroy = -> -- Stops current Stamp operation and destroys control construct control.Destroy = -> -- Stops current Stamp operation and destroys control construct
for i in *mouseCons for i = 1, #mouseCons
i\disconnect! mouseCons[i]\disconnect!
i = nil mouseCons[i] = nil
keyCon?\disconnect! keyCon?\disconnect!

View File

@ -3,7 +3,7 @@ $load $FILE
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil
@ -681,11 +681,8 @@ filterGear = (terms) ->
splitByWhitespace = (text) -> splitByWhitespace = (text) ->
return if type(text) ~= "string" return if type(text) ~= "string"
terms = {} [token for token in string.gmatch text,
for token in string.gmatch text, "[^%s]+" "[^%s]+" when string.len(token) > 0]
if string.len(token) > 0
table.insert terms, token
terms
showSearchGear = (searchTerms) -> showSearchGear = (searchTerms) ->
return if not backpack.Gear.Visible return if not backpack.Gear.Visible
@ -699,7 +696,7 @@ showSearchGear = (searchTerms) ->
else else
nil nil
if not searchTermTable? if searchTermTable == nil
showEntireGrid! showEntireGrid!
return return
@ -809,7 +806,7 @@ if not backpack.Visible
-- make sure that inventory is listening to gear reparenting -- make sure that inventory is listening to gear reparenting
if not characterChildAddedCon? and game.Players.LocalPlayer["Character"] if characterChildAddedCon == nil and game.Players.LocalPlayer["Character"]
setupCharacterConnections! setupCharacterConnections!
if not backpackAddCon if not backpackAddCon

View File

@ -45,7 +45,7 @@ Camera = Game.Workspace.CurrentCamera
-- Heliodex's basic New function (basically a simplified version of melt) -- Heliodex's basic New function (basically a simplified version of melt)
New = (className, name, props) -> New = (className, name, props) ->
if not props? -- no name was provided if props == nil -- no name was provided
props = name props = name
name = nil name = nil