roblonium-web/Game/FinobeTools/StamperTool.rbxm

6892 lines
256 KiB
Plaintext

<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Tool" referent="RBX0">
<Properties>
<bool name="Enabled">true</bool>
<CoordinateFrame name="Grip">
<X>0</X>
<Y>0</Y>
<Z>0.349999994</Z>
<R00>1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>1</R22>
</CoordinateFrame>
<string name="Name">StamperTool</string>
<Content name="TextureId"><url>http://www.roblox.com/asset/?id=59102781</url></Content>
</Properties>
<Item class="Part" referent="RBX1">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">194</int>
<CoordinateFrame name="CFrame">
<X>0.0988349915</X>
<Y>0.274166554</Y>
<Z>-0.195800781</Z>
<R00>0.995120585</R00>
<R01>-7.11792454e-005</R01>
<R02>0.0986662284</R02>
<R10>-1.0218595e-005</R10>
<R11>0.999999642</R11>
<R12>0.000824476127</R12>
<R20>-0.0986662582</R20>
<R21>-0.000821461435</R21>
<R22>0.995120227</R22>
</CoordinateFrame>
<bool name="CanCollide">true</bool>
<float name="Elasticity">0.5</float>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<token name="Material">256</token>
<string name="Name">Handle</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<token name="formFactorRaw">1</token>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>0.400000006</Y>
<Z>1</Z>
</Vector3>
</Properties>
<Item class="SpecialMesh" referent="RBX2">
<Properties>
<token name="LODX">2</token>
<token name="LODY">2</token>
<Content name="MeshId"><url>http://www.roblox.com/asset/?id=42163552</url></Content>
<token name="MeshType">5</token>
<string name="Name">Mesh</string>
<Vector3 name="Offset">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<Vector3 name="Scale">
<X>0.899999976</X>
<Y>0.899999976</Y>
<Z>0.899999976</Z>
</Vector3>
<Content name="TextureId"><url>http://www.roblox.com/asset/?id=42163513</url></Content>
<Vector3 name="VertexColor">
<X>1</X>
<Y>1</Y>
<Z>1</Z>
</Vector3>
</Properties>
</Item>
</Item>
<Item class="ObjectValue" referent="RBX3">
<Properties>
<string name="Name">PlayerOwner</string>
<Ref name="Value">null</Ref>
</Properties>
</Item>
<Item class="ObjectValue" referent="RBX4">
<Properties>
<string name="Name">SavedState</string>
<Ref name="Value">null</Ref>
</Properties>
</Item>
<Item class="Model" referent="RBX5">
<Properties>
<CoordinateFrame name="ModelInPrimary">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<R00>1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>1</R22>
</CoordinateFrame>
<string name="Name">LuaGlobalVariables</string>
<Ref name="PrimaryPart">null</Ref>
</Properties>
<Item class="Model" referent="RBX6">
<Properties>
<CoordinateFrame name="ModelInPrimary">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<R00>1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>1</R22>
</CoordinateFrame>
<string name="Name">InsertAsset</string>
<Ref name="PrimaryPart">null</Ref>
</Properties>
<Item class="StringValue" referent="RBX7">
<Properties>
<string name="Name">AssetName</string>
<string name="Value"></string>
</Properties>
</Item>
<Item class="IntValue" referent="RBX8">
<Properties>
<string name="Name">AssetId</string>
<int name="Value">0</int>
</Properties>
</Item>
<Item class="StringValue" referent="RBX9">
<Properties>
<string name="Name">Image</string>
<string name="Value"></string>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX10">
<Properties>
<string name="Name">StampMode</string>
<bool name="Value">true</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX11">
<Properties>
<string name="Name">Updated</string>
<bool name="Value">false</bool>
</Properties>
</Item>
</Item>
<Item class="BoolValue" referent="RBX12">
<Properties>
<string name="Name">SwitchLoaderToDialog</string>
<bool name="Value">false</bool>
</Properties>
<Item class="StringValue" referent="RBX13">
<Properties>
<string name="Name">DialogType</string>
<string name="Value">Stamp</string>
</Properties>
</Item>
<Item class="StringValue" referent="RBX14">
<Properties>
<string name="Name">AssetImage</string>
<string name="Value">nil</string>
</Properties>
</Item>
</Item>
<Item class="BoolValue" referent="RBX15">
<Properties>
<string name="Name">ShowInvalidPlacement</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX16">
<Properties>
<string name="Name">ShowMaxedOut</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX17">
<Properties>
<string name="Name">SwitchMode</string>
<bool name="Value">false</bool>
</Properties>
<Item class="StringValue" referent="RBX18">
<Properties>
<string name="Name">Mode</string>
<string name="Value"></string>
</Properties>
</Item>
</Item>
<Item class="BoolValue" referent="RBX19">
<Properties>
<string name="Name">Stamped</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX20">
<Properties>
<string name="Name">Moving</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX21">
<Properties>
<string name="Name">ShowAdminCategories</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="IntValue" referent="RBX22">
<Properties>
<string name="Name">userIDs</string>
<int name="Value">1</int>
</Properties>
<Item class="IntValue" referent="RBX23">
<Properties>
<string name="Name">userID</string>
<int name="Value">11744447</int>
</Properties>
</Item>
</Item>
<Item class="BoolValue" referent="RBX24">
<Properties>
<string name="Name">ReloadCurrentAsset</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX25">
<Properties>
<string name="Name">ReloadCurrentAsset</string>
<bool name="Value">false</bool>
</Properties>
</Item>
<Item class="BoolValue" referent="RBX26">
<Properties>
<string name="Name">MouseClick</string>
<bool name="Value">false</bool>
</Properties>
</Item>
</Item>
<Item class="LocalScript" referent="RBX27">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">BasePlateGuide</string>
<ProtectedString name="Source">local pointDirection = nil
local tailLength = 2 -- 2 or 7
--local dSize = -.05 -- .01 or .005
local dSize = 0 -- because we want the targets to all be the same size (tail isn&apos;t larger anymore; just &quot;ghost&quot; effect)
local dTime = .04 --.025
-- old targetLock pic (square): 48972746
local targetLockSize = .2
local arrowSize = .1
local arrowScreenProportionSize = .95
local arrowMoveFactor = .025
local targetMoveFactor = targetLockSize / 2 - .025
local halfDSize = dSize / 2
local r = game:service(&quot;RunService&quot;)
local vChar = script.Parent
if vChar == nil then script.Parent = nil end
local vPlay = game.Players:GetPlayerFromCharacter(vChar)
if vPlay == nil then script.Parent = nil end
local arrowGui = vPlay.PlayerGui:FindFirstChild(&quot;GuideArrowGui&quot;)
if arrowGui == nil then
&#9;arrowGui = script.GuideArrowGui
&#9;arrowGui.Parent = vPlay.PlayerGui
else
&#9;script.GuideArrowGui:remove()
end
local upArrow = arrowGui.UpArrow
local downArrow = arrowGui.DownArrow
local leftArrow = arrowGui.LeftArrow
local rightArrow = arrowGui.RightArrow
local targetLock = arrowGui.TargetLock
local arrowList = {upArrow, downArrow, leftArrow, rightArrow, targetLock}
local goAway = arrowGui.GoAwayButton
goAway.Visible = true
goAway.Active = true
local keepShowing = true
goAway.MouseButton1Click:connect(function () keepShowing = false end)
local arrowHeightAugment = 0.0
local arrowWidthAugment = 0.0
local targetHeightAugment = 0.0
local targetWidthAugment = 0.0
local targetLockList = {targetLock}
for i = 1, tailLength do table.insert(targetLockList, targetLock:Clone()) end
targetLockList[1].Size = UDim2.new(targetLockSize, 0, targetLockSize, 0)
for i = 1, #targetLockList-1 do
&#9;targetLockList[i+1].Parent = arrowGui
&#9;--targetLockList[i+1].Size = UDim2.new(targetLockSize-i*dSize, 0, targetLockSize-i*dSize, 0)
end
-- switching over to a &quot;ghost-like&quot; transparency effect, but this means we have to upload separate images :(
-- if our tail is turned on, manually apply the ghosting to the next two images
if tailLength &gt; 0 then targetLockList[2].Image = &quot;http://www.roblox.com/asset/?id=49324811&quot; end
if tailLength &gt; 1 then targetLockList[3].Image = &quot;http://www.roblox.com/asset/?id=49324846&quot; end
function onResize() -- force arrows into a square resolution
&#9;xSize = arrowGui.AbsoluteSize.X
&#9;ySize = arrowGui.AbsoluteSize.Y
&#9;if xSize &gt;= ySize then
&#9;&#9;arrowHeightAugment = 0.0
&#9;&#9;-- calculate arrowWidthAugment and new arrow ratio here
&#9;&#9;newArrowUDim = UDim2.new(ySize / xSize * arrowSize, 0, arrowSize, 0)
&#9;&#9;rightArrow.Size = newArrowUDim
&#9;&#9;leftArrow.Size = newArrowUDim
&#9;&#9;upArrow.Size = newArrowUDim
&#9;&#9;downArrow.Size = newArrowUDim
&#9;&#9;for tli = 1, #targetLockList do
&#9;&#9;&#9;targetLockList[tli].Size = UDim2.new(ySize / xSize * (targetLockSize-tli*dSize), 0, targetLockSize-tli*dSize, 0)
&#9;&#9;end
&#9;&#9;arrowWidthAugment = (xSize - ySize)*arrowSize*.5 / xSize
&#9;else
&#9;&#9;arrowWidthAugment = 0.0
&#9;&#9;-- calculate arrowHeightAugment here
&#9;&#9;newArrowUDim = UDim2.new(arrowSize, 0, xSize / ySize * arrowSize, 0)
&#9;&#9;rightArrow.Size = newArrowUDim
&#9;&#9;leftArrow.Size = newArrowUDim
&#9;&#9;upArrow.Size = newArrowUDim
&#9;&#9;downArrow.Size = newArrowUDim
&#9;&#9;for tli = 1, #targetLockList do
&#9;&#9;&#9;targetLockList[tli].Size = UDim2.new(targetLockSize-tli*dSize, 0, xSize / ySize * (targetLockSize-tli*dSize), 0)
&#9;&#9;end
&#9;&#9;arrowHeightAugment = (ySize - xSize)*arrowSize*.5 / ySize
&#9;end
&#9;targetWidthAugment = targetLock.Size.X.Scale / 2 - .025
&#9;targetHeightAugment = targetLock.Size.Y.Scale / 2 - .025
end
arrowGui.Changed:connect(onResize) -- dynamically resize the arrows on screen resize
function findMyBasePlate()
&#9;--if true then return game.Workspace.Base end -- for testing purposes
&#9;local buildingAreas = game.Workspace.BuildingAreas:GetChildren()
&#9;for i = 1, #buildingAreas do
&#9;&#9;if buildingAreas[i].Player.Value == script.Parent.Name then
&#9;&#9;&#9;return buildingAreas[i]:FindFirstChild(&quot;BasePlate&quot;) or buildingAreas[i].PlayerArea:FindFirstChild(&quot;BasePlate&quot;)
&#9;&#9;end
&#9;end
end
local myBase = findMyBasePlate()
if myBase == nil then
&#9;print(&quot;BasePlateGuide script error: no base plate found!&quot;)
&#9;-- abort if no BasePlate found
&#9;arrowGui:remove()
&#9;script:remove()
end
function setVisible(whichArrow)
&#9;for i = 1, #arrowList do
&#9;&#9;if arrowList[i] == whichArrow then
&#9;&#9;&#9;arrowList[i].Visible = true
&#9;&#9;else
&#9;&#9;&#9;arrowList[i].Visible = false
&#9;&#9;end
&#9;end
end
function truncate(number, augmentation)
&#9;if number+augmentation &lt; 0 then return 0
elseif number &gt; (1 - arrowSize)+augmentation then return (1 - arrowSize)+2*augmentation -- furthest extent we want the arrows to reach is .95 - arrowSize
&#9;else return number+augmentation end
end
function notInBasePlate(myPos, base)
&#9;local corner1 = base.Position - base.Size/2
&#9;local corner2 = base.Position + base.Size/2
&#9;if myPos.X &gt; corner1.X and myPos.Y &gt; corner1.Y and myPos.Z &gt; corner1.Z and myPos.X &lt; corner2.X and myPos.Z &lt; corner2.Z then -- we only care they&apos;re somewhere above baseplate
&#9;&#9;return false
&#9;else
&#9;&#9;return true
&#9;end
end
local lastTime = 0
local camera = game.Workspace.CurrentCamera
while notInBasePlate(script.Parent.Torso.Position, myBase) and keepShowing do
&#9;--pointDirection = (myBase.Position - script.Parent.Torso.Position) * Vector3.new(1, 0, 1)
&#9;camFrame = camera.CoordinateFrame
&#9;pointDirection = camFrame:vectorToObjectSpace(myBase.Position - camFrame.p)
&#9;camZ = pointDirection.Z
&#9;camX = pointDirection.X/math.abs(camZ)
&#9;camY = pointDirection.Y/math.abs(camZ)
&#9;--print(camX, camY, camZ)
&#9;-- was .55 for 610 (Y) and 1.15 for 1286 (X), so seems like scaling factor is universally 1114 on both axes&#9;
&#9;-- nvm: at 1662 x 666, we have ... and .55, so seems like .55 always for Y, then X is scaled according to its proportion to Y
&#9;local xThreshold = arrowGui.AbsoluteSize.X / arrowGui.AbsoluteSize.Y * .55
&#9;local yThreshold = .55
&#9;local nCamX = camX / xThreshold
&#9;local nCamY = camY / yThreshold
&#9;if (math.abs(nCamX) &gt; 1 or math.abs(nCamY) &gt; 1) or (camZ &gt; 0) then -- camZ test makes sure we only lock on if facing right direction
&#9;&#9;for j = 2, #targetLockList do
&#9;&#9;&#9;targetLockList[j].Visible = false
&#9;&#9;end
&#9;
&#9;&#9;if math.abs(nCamX) &gt; math.abs(nCamY) then
&#9;&#9;&#9;--if nCamY &gt; 1 then nCamY = 1
&#9;&#9;&#9;--elseif nCamY &lt; -1 then nCamY = -1 end
&#9;&#9;&#9;if camX &gt; 0 then
&#9;&#9;&#9;&#9;-- should go right
&#9;&#9;&#9;&#9;rightArrow.Position = UDim2.new(arrowScreenProportionSize - arrowMoveFactor - .025 + 2*arrowWidthAugment, 0, truncate(arrowScreenProportionSize*(1-nCamY)/2 - arrowMoveFactor, arrowHeightAugment), 0)
&#9;&#9;&#9;&#9;setVisible(rightArrow)
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;-- should go left
&#9;&#9;&#9;&#9;leftArrow.Position = UDim2.new(0, 0, truncate(arrowScreenProportionSize*(1-nCamY)/2 - arrowMoveFactor, arrowHeightAugment), 0)
&#9;&#9;&#9;&#9;setVisible(leftArrow)
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;--if nCamX &gt; 1 then nCamX = 1
&#9;&#9;&#9;--elseif nCamX &lt; -1 then nCamX = -1 end
&#9;&#9;&#9;if camY &gt; 0 then
&#9;&#9;&#9;&#9;-- should go up
&#9;&#9;&#9;&#9;upArrow.Position = UDim2.new(truncate(arrowScreenProportionSize*(nCamX+1)/2 - arrowMoveFactor, arrowWidthAugment), 0, 0, 0)
&#9;&#9;&#9;&#9;setVisible(upArrow)
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;-- should go down
&#9;&#9;&#9;&#9;downArrow.Position = UDim2.new(truncate(arrowScreenProportionSize*(nCamX+1)/2 - arrowMoveFactor, arrowWidthAugment), 0, arrowScreenProportionSize - arrowMoveFactor -.025 + 2*arrowHeightAugment, 0)
&#9;&#9;&#9;&#9;setVisible(downArrow)
&#9;&#9;&#9;end
&#9;&#9;end
&#9;else
&#9;&#9;-- locked on target
&#9;&#9;--for j = 2, #targetLockList do
&#9;&#9;&#9;--targetLockList[j].Visible = true
&#9;&#9;--end
&#9;&#9;--targetLock.Position = UDim2.new(.95*(nCamX+1)/2 - targetMoveFactor, 0, .95*(1-nCamY)/2 - targetMoveFactor, 0)
&#9;&#9;targetLock.Position = UDim2.new(.95*(nCamX+1)/2 - targetWidthAugment, 0, .95*(1-nCamY)/2 - targetHeightAugment, 0)
&#9;&#9;setVisible(targetLock)
&#9;end
&#9;--wait()
&#9;
&#9;-- update every dTime seconds
&#9;-- ok to do it this way instead of a ring array, because even though it&apos;s less efficient, it&apos;s less efficient by only one or two commands [since only have 2 &quot;tails&quot;]
&#9;local t = r.Stepped:wait()
&#9;if t - lastTime &gt; dTime then
&#9;&#9;lastTime = t
&#9;&#9;for j = #targetLockList, 2, -1 do
&#9;&#9;&#9;targetLockList[j].Position = targetLockList[j-1].Position + UDim2.new(halfDSize, 0, halfDSize, 0)
&#9;&#9;&#9;targetLockList[j].Visible = targetLockList[j-1].Visible
&#9;&#9;end
&#9;end
end
--[[setVisible(nil)
for j = 2, #targetLockList do
&#9;targetLockList[j].Visible = false
end
goAway.Visible = false
goAway.Active = false
]]--
arrowGui:remove()
script:remove()</ProtectedString>
</Properties>
<Item class="ScreenGui" referent="RBX28">
<Properties>
<string name="Name">GuideArrowGui</string>
</Properties>
<Item class="ImageLabel" referent="RBX29">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset/?id=48972729 </url></Content>
<string name="Name">UpArrow</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.0500000007</XS>
<XO>0</XO>
<YS>0.0500000007</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX30">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset/?id=48972703</url></Content>
<string name="Name">RightArrow</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.0500000007</XS>
<XO>0</XO>
<YS>0.0500000007</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX31">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset/?id=48972653</url></Content>
<string name="Name">DownArrow</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.0500000007</XS>
<XO>0</XO>
<YS>0.0500000007</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX32">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset/?id=48972682</url></Content>
<string name="Name">LeftArrow</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.0500000007</XS>
<XO>0</XO>
<YS>0.0500000007</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX33">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset/?id=49321779</url></Content>
<string name="Name">TargetLock</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.0500000007</XS>
<XO>0</XO>
<YS>0.0500000007</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextButton" referent="RBX34">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4278255360</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">GoAwayButton</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>20</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>150</XO>
<YS>0</YS>
<YO>20</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<string name="Text">Hide Guide Arrows</string>
<Color3 name="TextColor3">4279970357</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="ScreenGui" referent="RBX35">
<Properties>
<string name="Name">StampGUI</string>
</Properties>
<Item class="Frame" referent="RBX36">
<Properties>
<bool name="Active">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">InsertPanel</string>
<UDim2 name="Position">
<XS>0.200000003</XS>
<XO>2</XO>
<YS>0.100000001</YS>
<YO>24</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.600000024</XS>
<XO>-20</XO>
<YS>0.639999986</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">3</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="Frame" referent="RBX37">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">ItemsFrame</string>
<UDim2 name="Position">
<XS>0.239999995</XS>
<XO>0</XO>
<YS>0.0850000009</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.540000021</XS>
<XO>0</XO>
<YS>0.800000012</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="Frame" referent="RBX38">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294112243</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">InsertAssetButtonExample</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>128</XO>
<YS>0</YS>
<YO>64</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>64</XO>
<YS>0</YS>
<YO>64</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextButton" referent="RBX39">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4282861383</Color3>
<float name="BackgroundTransparency">0.100000001</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">Button</string>
<UDim2 name="Position">
<XS>0.0250000004</XS>
<XO>0</XO>
<YS>0.0250000004</YS>
<YO>0</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0.949999988</XS>
<XO>0</XO>
<YS>0.949999988</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4279970357</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0.100000001</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="ImageLabel" referent="RBX40">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><null></null></Content>
<string name="Name">ButtonImage</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-8</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>16</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">2</int>
</Properties>
</Item>
</Item>
<Item class="IntValue" referent="RBX41">
<Properties>
<string name="Name">AssetId</string>
<int name="Value">209411115</int>
</Properties>
</Item>
<Item class="StringValue" referent="RBX42">
<Properties>
<string name="Name">AssetName</string>
<string name="Value">Roof - Outer Corner</string>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX43">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4278190080</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54140547</url></Content>
<string name="Name">ConfigIcon</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-23</XO>
<YS>1</YS>
<YO>-24</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>16</XO>
<YS>0</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="TextButton" referent="RBX44">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<bool name="Modal">false</bool>
<string name="Name">CancelButton</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-32</XO>
<YS>0</YS>
<YO>-2</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>34</XO>
<YS>0</YS>
<YO>34</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">1</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="ImageLabel" referent="RBX45">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54135717</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-2</XO>
<YS>0</YS>
<YO>-2</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>16</XO>
<YS>0</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
<Item class="TextButton" referent="RBX46">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<bool name="Modal">false</bool>
<string name="Name">SelectSetButton</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0.200000003</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">1</token>
<string name="Text">Select Set</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="Frame" referent="RBX47">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">PagingControls</string>
<UDim2 name="Position">
<XS>0.239999995</XS>
<XO>0</XO>
<YS>0.899999976</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.540000021</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextButton" referent="RBX48">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<bool name="Modal">false</bool>
<string name="Name">PreviousPageButton</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-95</XO>
<YS>0.5</YS>
<YO>-20</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>60</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="ImageLabel" referent="RBX49">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54138586</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>-1</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>18</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
<Item class="TextLabel" referent="RBX50">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4284874854</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<string name="Name">PageText</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-30</XO>
<YS>0.5</YS>
<YO>-20</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>60</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">1 / 3</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextButton" referent="RBX51">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<bool name="Modal">false</bool>
<string name="Name">NextPageButton</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>35</XO>
<YS>0.5</YS>
<YO>-20</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>60</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="ImageLabel" referent="RBX52">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54138563</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>10</XO>
<YS>0</YS>
<YO>-1</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>18</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="Frame" referent="RBX53">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294901862</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">Sets</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>5</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.230000004</XS>
<XO>0</XO>
<YS>1</YS>
<YO>-5</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="Frame" referent="RBX54">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">0.699999988</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">Line</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-3</XO>
<YS>0.0599999987</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>3</XO>
<YS>0.899999976</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX55">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<string name="Name">SetsHeader</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>47</XO>
<YS>0</YS>
<YO>24</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Sets</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="Frame" referent="RBX56">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4291559577</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">SetsLists</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0.0599999987</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>-6</XO>
<YS>0.939999998</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextButton" referent="RBX57">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">1</token>
<token name="FontSize">6</token>
<bool name="Modal">false</bool>
<string name="Name">SetButtonExample</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>5</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>1</XS>
<XO>-5</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<string name="Text">House Decorations</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="Frame" referent="RBX58">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4284874803</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">ItemPreview</string>
<UDim2 name="Position">
<XS>0.790000021</XS>
<XO>0</XO>
<YS>0.0850000009</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.209999993</XS>
<XO>0</XO>
<YS>0.899999976</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="ImageLabel" referent="RBX59">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4278190080</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><null></null></Content>
<string name="Name">LargePreview</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>170</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">3</int>
</Properties>
</Item>
<Item class="Frame" referent="RBX60">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4286578816</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">TextPanel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0.449999988</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0.550000012</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextLabel" referent="RBX61">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4291624857</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<string name="Name">RolloverText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Window - Diagonal</string>
<Color3 name="TextColor3">4294112243</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="Frame" referent="RBX62">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">ConfigureText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>-48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextLabel" referent="RBX63">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294901862</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">Configure</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Configure:</string>
<Color3 name="TextColor3">4294112243</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX64">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">1</token>
<token name="FontSize">5</token>
<string name="Name">Configure1</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>14</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Speed</string>
<Color3 name="TextColor3">4294112243</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX65">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">1</token>
<token name="FontSize">5</token>
<string name="Name">Configure2</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>28</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Damage</string>
<Color3 name="TextColor3">4294112243</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX66">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">1</token>
<token name="FontSize">5</token>
<string name="Name">Configure3</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>42</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Delay</string>
<Color3 name="TextColor3">4294112243</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
</Item>
</Item>
<Item class="Frame" referent="RBX67">
<Properties>
<bool name="Active">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">StamperPanel</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-175</XO>
<YS>1</YS>
<YO>-135</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>350</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">3</token>
<bool name="Visible">true</bool>
<int name="ZIndex">2</int>
</Properties>
<Item class="TextButton" referent="RBX68">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<bool name="Modal">false</bool>
<string name="Name">MinimizeButton</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-32</XO>
<YS>0</YS>
<YO>-2</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>34</XO>
<YS>0</YS>
<YO>34</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">1</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">3</int>
</Properties>
<Item class="ImageLabel" referent="RBX69">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54932670</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-3</XO>
<YS>0</YS>
<YO>-4</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>16</XO>
<YS>0</YS>
<YO>20</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">4</int>
</Properties>
</Item>
</Item>
<Item class="Frame" referent="RBX70">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">StamperButtons</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="Frame" referent="RBX71">
<Properties>
<bool name="Active">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">RecentFrame</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>103</XO>
<YS>0</YS>
<YO>-6</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>192</XO>
<YS>0</YS>
<YO>44</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">3</int>
</Properties>
<Item class="TextButton" referent="RBX72">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4282861383</Color3>
<float name="BackgroundTransparency">0.100000001</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">Button1</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-2</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>48</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0.100000001</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">0</token>
<token name="TextYAlignment">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">4</int>
</Properties>
<Item class="ImageLabel" referent="RBX73">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://gametest.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;assetversionid=209434543</url></Content>
<string name="Name">ButtonImage</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-8</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>16</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX74">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">ShortcutText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>7</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">F</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">8</int>
</Properties>
</Item>
</Item>
<Item class="TextButton" referent="RBX75">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4282861383</Color3>
<float name="BackgroundTransparency">0.100000001</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">Button2</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>48</XO>
<YS>0</YS>
<YO>-2</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>48</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4279970357</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0.100000001</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">4</int>
</Properties>
<Item class="ImageLabel" referent="RBX76">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://gametest.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;assetversionid=209434543</url></Content>
<string name="Name">ButtonImage</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-8</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>16</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX77">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">ShortcutText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>7</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">G</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">8</int>
</Properties>
</Item>
</Item>
<Item class="TextButton" referent="RBX78">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4282861383</Color3>
<float name="BackgroundTransparency">0.100000001</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">Button3</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>95</XO>
<YS>0</YS>
<YO>-3</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>48</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4279970357</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0.100000001</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">4</int>
</Properties>
<Item class="ImageLabel" referent="RBX79">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://gametest.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;assetversionid=209434543</url></Content>
<string name="Name">ButtonImage</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-8</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>16</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX80">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">ShortcutText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>7</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">H</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">8</int>
</Properties>
</Item>
</Item>
<Item class="TextButton" referent="RBX81">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4282861383</Color3>
<float name="BackgroundTransparency">0.100000001</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">0</token>
<bool name="Modal">false</bool>
<string name="Name">Button4</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>142</XO>
<YS>0</YS>
<YO>-3</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>48</XO>
<YS>0</YS>
<YO>48</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4279970357</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0.100000001</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">4</int>
</Properties>
<Item class="ImageLabel" referent="RBX82">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://gametest.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;assetversionid=209434543</url></Content>
<string name="Name">ButtonImage</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-8</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>16</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX83">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">ShortcutText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>7</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">J</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">8</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="TextButton" referent="RBX84">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<bool name="Modal">false</bool>
<string name="Name">CloneButton</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-6</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>45</XO>
<YS>0</YS>
<YO>45</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">3</int>
</Properties>
<Item class="ImageLabel" referent="RBX85">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=51641555</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-7</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>14</XO>
<YS>1</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">4</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX86">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">CloneShortcut</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">E</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
</Item>
<Item class="TextButton" referent="RBX87">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<bool name="Modal">false</bool>
<string name="Name">PartsButton</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>45</XO>
<YS>0</YS>
<YO>-6</YO>
</UDim2>
<bool name="Selected">true</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>45</XO>
<YS>0</YS>
<YO>45</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">3</int>
</Properties>
<Item class="ImageLabel" referent="RBX88">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54966682</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-7</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>14</XO>
<YS>1</YS>
<YO>14</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">4</int>
</Properties>
</Item>
<Item class="TextLabel" referent="RBX89">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">PartsShortcut</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-7</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>12</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Q</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">0</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">5</int>
</Properties>
</Item>
</Item>
<Item class="Frame" referent="RBX90">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">ClonePanel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>80</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">2</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextLabel" referent="RBX91">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">5</token>
<string name="Name">ClonePanelText</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-6</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>12</XO>
<YS>1</YS>
<YO>16</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Click on a part to clone it</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">true</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="TextButton" referent="RBX92">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">7</token>
<bool name="Modal">false</bool>
<string name="Name">RestoreButton</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-25</XO>
<YS>0</YS>
<YO>-20</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0</XS>
<XO>50</XO>
<YS>0</YS>
<YO>25</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">1</token>
<string name="Text"></string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">false</bool>
<int name="ZIndex">3</int>
</Properties>
<Item class="ImageLabel" referent="RBX93">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://www.roblox.com/asset?id=54933540</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>-4</XO>
<YS>0</YS>
<YO>-4</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>8</XO>
<YS>1</YS>
<YO>8</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">4</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="LocalScript" referent="RBX94">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">StampGuiController</string>
<ProtectedString name="Source">local stampGui = script.Parent
local insertPanel = stampGui.InsertPanel
local stamperPanel = stampGui.StamperPanel
local itemPreview = insertPanel.ItemPreview
function handleResize()
&#9;wait() -- neccessary to insure heartbeat happened
&#9;itemPreview.LargePreview.Size = UDim2.new(1,0,0,itemPreview.AbsoluteSize.X)
&#9;itemPreview.LargePreview.Position = UDim2.new(0.5,-itemPreview.LargePreview.AbsoluteSize.X/2,0,0)
&#9;itemPreview.TextPanel.Position = UDim2.new(0,0,0,itemPreview.LargePreview.AbsoluteSize.Y)
&#9;itemPreview.TextPanel.Size = UDim2.new(1,0,0,itemPreview.AbsoluteSize.Y - itemPreview.LargePreview.AbsoluteSize.Y)
end
stampGui.Changed:connect(function(prop)
&#9;if prop == &quot;AbsoluteSize&quot; then
&#9;&#9;handleResize()
&#9;end
end)
handleResize()</ProtectedString>
</Properties>
</Item>
<Item class="Frame" referent="RBX95">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">LoadDialog</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-175</XO>
<YS>0.5</YS>
<YO>-25</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>350</XO>
<YS>0</YS>
<YO>50</YO>
</UDim2>
<token name="SizeConstraint">1</token>
<token name="Style">3</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="TextLabel" referent="RBX96">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">2</token>
<token name="FontSize">8</token>
<string name="Name">LoadLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-8</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>155</XO>
<YS>0.5</YS>
<YO>36</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Loading...</string>
<Color3 name="TextColor3">4294506744</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
</Item>
<Item class="SelectionBox" referent="RBX97">
<Properties>
<Ref name="Adornee">null</Ref>
<int name="Color">21</int>
<string name="Name">ErrorBox</string>
<float name="Transparency">0</float>
<bool name="Visible">false</bool>
</Properties>
</Item>
<Item class="LocalScript" referent="RBX98">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">GuiScript</string>
<ProtectedString name="Source">-- This script is responsible for working the gui
-- basic functions
function waitForChild(instance, name)
&#9;while not instance:findFirstChild(name) do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
function waitForProperty(instance, name)
&#9;while not instance[name] do
&#9;&#9;instance.Changed:wait()
&#9;end
end
-- Locals
local Tool = script.Parent
waitForChild(Tool, &quot;LuaGlobalVariables&quot;)
local variables = Tool.LuaGlobalVariables
waitForChild(variables, &quot;InsertAsset&quot;)
local insertAsset = variables.InsertAsset
waitForChild(variables, &quot;SwitchMode&quot;)
local switchMode = variables.SwitchMode
waitForChild(variables, &quot;ShowAdminCategories&quot;)
local showAdminCategories = variables.ShowAdminCategories
waitForChild(variables, &quot;ReloadCurrentAsset&quot;)
waitForChild(variables,&quot;userIDs&quot;)
game:GetService(&quot;ContentProvider&quot;):Preload(&quot;http://www.roblox.com/asset/?id=42163425&quot;)
game:GetService(&quot;ContentProvider&quot;):Preload(&quot;http://www.roblox.com/asset/?id=42563487&quot;)
local BaseUrl = game:GetService(&quot;ContentProvider&quot;).BaseUrl
local buttonHeight = 64
local buttonWidth = buttonHeight
local waypointShowing = false
local showingPartPicker = true
local firstEquip = true
local Window
local Data
local loading = false
local startTime = 0
local SetCache = {}
local lastEnter = nil
-- For Restricting Stamper Tool
local buildingPlate
local partModel
-- wait for all of our set ids to load
local userIdsForStamperParts = variables.userIDs -- 7502714 This is UsabilityMan (on gametest)
function giveNewUserId(id)
&#9;local newUserId = Instance.new(&quot;IntValue&quot;)
&#9;newUserId.Name = &quot;userID&quot;
&#9;newUserId.Value = id
&#9;newUserId.Parent = userIdsForStamperParts
&#9;userIdsForStamperParts.Value = userIdsForStamperParts.Value + 1
end
BaseUrl = BaseUrl:lower()
local isRestricted = Instance.new(&quot;BoolValue&quot;)
isRestricted.Name = &quot;IsRestricted&quot;
isRestricted.Value = false
function isLocalWTRB()
&#9;waitForChild(game,&quot;StarterGui&quot;)
&#9;if game.StarterGui:FindFirstChild(&quot;VersionGui&quot;) then
&#9;&#9;if game.StarterGui.VersionGui:FindFirstChild(&quot;VersionText&quot;, true) then
&#9;&#9;&#9;return true
&#9;&#9;end
&#9;end
&#9;return false
end
waitForProperty(game,&quot;PlaceId&quot;)
if game.PlaceId == 41324860 or isLocalWTRB() then
&#9;isRestricted.Value = true
end
isRestricted.Parent = variables
giveNewUserId(18881789)
giveNewUserId(18881808)
if not isRestricted.Value then
&#9;giveNewUserId(18881829)
&#9;giveNewUserId(18881853)
&#9;giveNewUserId(18881866)
else
&#9;giveNewUserId(2409156)
&#9;giveNewUserId(19238067)
&#9;giveNewUserId(19238114)
end
while #userIdsForStamperParts:GetChildren() &lt; userIdsForStamperParts.Value do userIdsForStamperParts.ChildAdded:wait() end
userIdsForStamperParts = userIdsForStamperParts:GetChildren()
local useAssetVersionId = false
local LargeThumbnailUrl
local SmallThumbnailUrl
local InsertRows = 0
local InsertColumns = 0
local insertButtons = {}
local CancelDuringLoad
local prevPart = {AssetNameValue = &quot;&quot;,AssetIdValue = 0 ,InsertFrameButtonImage = &quot;&quot;}
local recentPartStack = {}
-- Connection Managers
local guiChangedCon = nil
local cloneButtonCon = nil
local partListClickCon = nil
local itemFrameChangedCon = nil
local setsNextPageCon = nil
local setsPrevPageCon = nil
local insertPanelCloseCon = nil
local minimizeCon = nil
local restoreCon = nil
local setButtonCons = {}
local insertButtonCons = {}
local recentPartStackCons = {}
local Mouse = nil
local currSetPage = 1
local mode = 0 -- 0 = main dialog, 1 = stamper, 2 = eyedropper
waitForChild(script.Parent,&quot;StampGUI&quot;)
local stamperGui = script.Parent.StampGUI
waitForChild(stamperGui,&quot;InsertPanel&quot;)
waitForChild(stamperGui.InsertPanel, &quot;CancelButton&quot;)
local currStampGui = nil
local maxRecentParts = 4
for i = 1, maxRecentParts do
&#9;recentPartStack[i] = {AssetNameValue,AssetIdValue,InsertFrameButtonImage}
&#9;recentPartStack[i].AssetNameValue = &quot;&quot;
&#9;recentPartStack[i].AssetIdValue = &quot;&quot;
&#9;recentPartStack[i].InsertFrameButtonImage = &quot;&quot;
end
----------------------------------------------------------------------------------------
-- functions
function showBaseplateGuideArrows()
&#9;playerCharacter = Tool.Parent
&#9;if playerCharacter:FindFirstChild(&quot;Humanoid&quot;) and not playerCharacter:FindFirstChild(&quot;BasePlateGuide&quot;) then
&#9;&#9;newGuide = Tool.BasePlateGuide:Clone()
&#9;&#9;newGuide.Parent = playerCharacter
&#9;&#9;newGuide.Disabled = false
&#9;end
end
function setAssetUrls()
&#9;if useAssetVersionId then
&#9;&#9;LargeThumbnailUrl = BaseUrl .. &quot;Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;assetversionid=&quot;
&#9;&#9;SmallThumbnailUrl = BaseUrl .. &quot;Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=75&amp;ht=75&amp;assetversionid=&quot;
&#9;else
&#9;&#9;LargeThumbnailUrl = BaseUrl .. &quot;Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=420&amp;ht=420&amp;aid=&quot;
&#9;&#9;SmallThumbnailUrl = BaseUrl .. &quot;Game/Tools/ThumbnailAsset.ashx?fmt=png&amp;wd=75&amp;ht=75&amp;aid=&quot;
&#9;end
end
function signalSwitchMode(mode)
&#9;switchMode.Mode.Value = mode
&#9;switchMode.Value = true
end
function goToClone()
&#9;cancelLoadingWindow()
&#9;closeInsertPanel()
&#9;cancelAssetPlacement()
&#9;mode = 2
&#9;--signalStamperScript(&quot;&quot;,0,&quot;&quot;,&quot;&quot;,false)
&#9;signalSwitchMode(&quot;Clone&quot;)
&#9;currStampGui.StamperPanel.StamperButtons.ClonePanel.Visible = true
&#9;currStampGui.StamperPanel.StamperButtons.CloneButton.Selected = true
&#9;if currStampGui.Parent ~= nil then
&#9;&#9;currStampGui.StamperPanel.StamperButtons.ClonePanel:TweenPosition(UDim2.new(0, -88, 0, -8),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.35,true)
&#9;&#9;delay(0.3,function() currStampGui.StamperPanel.StamperButtons.ClonePanel.ClonePanelText.Visible = true end)
&#9;end
end
function goToStamp()
&#9;mode = 1
&#9;cancelLoadingWindow()
&#9;closeInsertPanel()
&#9;closeClonePanel()
end
function goToInsertPanel()
&#9;cancelLoadingWindow()
&#9;closeClonePanel()
&#9;pcall(function() currStampGui.InsertPanel.CancelButton.Modal = true end)
&#9;currStampGui.StamperPanel.StamperButtons.PartsButton.Selected = true
&#9;if not showingPartPicker then
&#9;&#9;showingPartPicker = true
&#9;&#9;if currStampGui.Parent ~= nil then
&#9;&#9;&#9;currStampGui.InsertPanel:TweenPosition(UDim2.new(0.2, 2, 0.1, 24),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.35,true)
&#9;&#9;end
&#9;else
&#9;&#9;closeInsertPanel()
&#9;&#9;reloadCurrentAsset()
&#9;end
end
function closeInsertPanel()
&#9;pcall(function() currStampGui.InsertPanel.CancelButton.Modal = false end)
&#9;currStampGui.StamperPanel.StamperButtons.PartsButton.Selected = false
&#9;showingPartPicker = false
&#9;if currStampGui.Parent ~= nil then
&#9;&#9;currStampGui.InsertPanel:TweenPosition(UDim2.new(0.2, 2, 1, 24),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.35,true)
&#9;end
end
function closeClonePanel()
&#9;currStampGui.StamperPanel.StamperButtons.ClonePanel.ClonePanelText.Visible = false
&#9;currStampGui.StamperPanel.StamperButtons.CloneButton.Selected = false
&#9;if currStampGui.Parent ~= nil then
&#9;&#9;currStampGui.StamperPanel.StamperButtons.ClonePanel:TweenPosition(UDim2.new(0, 0, 0, -8),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.35,true)
&#9;&#9;delay(0.3,function() currStampGui.StamperPanel.StamperButtons.ClonePanel.Visible = false end)
&#9;end
end
function cancelAssetPlacement()
&#9;gInitial90DegreeRotations = 0
&#9;Data.Stamp.Cancelled = true
&#9;Data.Stamp.Dragger = nil
&#9;if Data.Stamp.Model then
&#9;&#9;Data.Stamp.Model:Remove()
&#9;&#9;Data.Stamp.Model = nil
&#9;end
&#9;if Data.Stamp.CurrentParts then
&#9;&#9;for index, object in pairs(Data.Stamp.CurrentParts) do
&#9;&#9;&#9;object:Remove()
&#9;&#9;end
&#9;&#9;Data.Stamp.CurrentParts = nil
&#9;end
&#9;if Mouse then
&#9;&#9;Mouse.Icon =&quot;rbxasset://textures\\ArrowCursor.png&quot;
&#9;end
&#9;game.JointsService:ClearJoinAfterMoveJoints()
end
function hint(label)
&#9;-- Pass in a string, it shows a top hint. (Replaces previous hint, if exists)
&#9;_player = game.Players:GetPlayerFromCharacter(Tool.Parent)
&#9;if(_player.PlayerGui:FindFirstChild(&quot;topHint&quot;)~=nil) then
&#9;&#9;local topHint = _player.PlayerGui.topHint
&#9;&#9;topHint.Add.Label.Value = label
&#9;&#9;topHint.Add.Width.Value = 3 -- widest width
&#9;&#9;topHint.Add.Time.Value = 5
&#9;&#9;topHint.Add.Disabled = true
&#9;&#9;topHint.Add.Disabled = false
&#9;end
end
function getPlayer()
&#9;return game.Players:GetPlayerFromCharacter(script.Parent.Parent)
end
function getHumanoid()
&#9;local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
&#9;if player then
&#9;&#9;waitForProperty(player,&quot;Character&quot;)
&#9;&#9;waitForChild(player.Character,&quot;Humanoid&quot;)
&#9;&#9;return player.Character.Humanoid
&#9;else
&#9;&#9;return nil
&#9;end
end
function buildSetButton(name, setId, setImageId, i, count)
&#9;local button = currStampGui.InsertPanel.Sets.SetsLists.SetButtonExample:Clone()
&#9;button.Text = name
&#9;button.Name = &quot;SetButton&quot;
&#9;button.Visible = true
&#9;local setValue = Instance.new(&quot;IntValue&quot;)
&#9;setValue.Name = &quot;SetId&quot;
&#9;setValue.Value = setId
&#9;setValue.Parent = button
&#9;local setName = Instance.new(&quot;StringValue&quot;)
&#9;setName.Name = &quot;SetName&quot;
&#9;setName.Value = name
&#9;setName.Parent = button
&#9;return button
end
function previousSetPage()
&#9;local newIndex = math.max(0, Data.Category[Data.CurrentCategory].Index - (InsertRows * InsertColumns))
&#9;setSetIndex(newIndex)
end
function nextSetPage()
&#9;local newIndex = math.max(0, Data.Category[Data.CurrentCategory].Index + (InsertRows * InsertColumns))
&#9;setSetIndex(newIndex)
end
function setInsertButtonImageBehavior(insertFrame, visible, name, assetId)
&#9;if visible then
&#9;&#9;insertFrame.AssetName.Value = name
&#9;&#9;insertFrame.AssetId.Value = assetId
&#9;&#9;local newImageUrl = SmallThumbnailUrl .. assetId
&#9;&#9;if newImageUrl ~= insertFrame.Button.ButtonImage.Image then
&#9;&#9;&#9;delay(0,function()
&#9;&#9;&#9;&#9;game:GetService(&quot;ContentProvider&quot;):Preload(SmallThumbnailUrl .. assetId)
&#9;&#9;&#9;&#9;insertFrame.Button.ButtonImage.Image = SmallThumbnailUrl .. assetId
&#9;&#9;&#9;end)
&#9;&#9;end
&#9;&#9;table.insert(insertButtonCons,
&#9;&#9;&#9;insertFrame.Button.MouseButton1Click:connect(function()
&#9;&#9;&#9;&#9;beginInsertAssetGui(insertFrame.AssetName.Value, insertFrame.AssetId.Value, insertFrame.Button.ButtonImage.Image, 1)
&#9;&#9;&#9;end)
&#9;&#9;)
&#9;&#9;insertFrame.Visible = true
&#9;else
&#9;&#9;insertFrame.Visible = false
&#9;end
end
function setSetIndex(dataOffset)
&#9;Data.Category[Data.CurrentCategory].Index = dataOffset
&#9;InsertRows = math.floor(currStampGui.InsertPanel.ItemsFrame.AbsoluteSize.Y/buttonHeight)
&#9;InsertColumns = math.floor(currStampGui.InsertPanel.ItemsFrame.AbsoluteSize.X/buttonWidth)
&#9;local PageSize = InsertRows * InsertColumns
&#9;local contents = Data.Category[Data.CurrentCategory].Contents
&#9;if contents then
&#9;&#9;
&#9;&#9;local numOfPages = math.ceil((#contents)/(PageSize))
&#9;&#9;local currPage = math.ceil((dataOffset/PageSize) + 1)
&#9;&#9;currStampGui.InsertPanel.PagingControls.PageText.Text = tostring(currPage) .. &quot;/&quot; .. tostring(numOfPages)
&#9;&#9;currStampGui.InsertPanel.PagingControls.PageText.Visible = (numOfPages &gt; 1)
currStampGui.InsertPanel.PagingControls.PreviousPageButton.Visible = (numOfPages &gt; 1) and dataOffset &gt; 1
&#9;&#9;currStampGui.InsertPanel.PagingControls.NextPageButton.Visible = (numOfPages &gt; 1) and ((dataOffset - 1) + PageSize) &lt; (#contents)
&#9;&#9;-- remove our buttons and their connections
&#9;&#9;for i = 1, #insertButtons do
&#9;&#9;&#9;insertButtons[i]:remove()
&#9;&#9;end
&#9;&#9;for i = 1, #insertButtonCons do
&#9;&#9;&#9;pcall(function() insertButtonCons[i]:disconnect() end)
&#9;&#9;end
&#9;&#9;insertButtonCons = {}
&#9;&#9;insertButtons = {}
&#9;&#9;local arrayPosition = 1
&#9;&#9;for y = 1, InsertRows do
&#9;&#9;&#9;for x = 1, InsertColumns do
&#9;&#9;&#9;&#9;local buttonPosition = UDim2.new(0,(buttonWidth)*(x-1),0, (buttonHeight)*(y-1))
&#9;&#9;&#9;&#9;local buttonCon
&#9;&#9;&#9;&#9;insertButtons[arrayPosition], buttonCon = buildInsertButton(buttonPosition)
&#9;&#9;&#9;&#9;table.insert(insertButtonCons,buttonCon)
&#9;&#9;&#9;&#9;insertButtons[arrayPosition].Parent = currStampGui.InsertPanel.ItemsFrame
&#9;&#9;&#9;&#9;arrayPosition = arrayPosition + 1
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;Data.InsertButtons = insertButtons
&#9;&#9;for index = 1, PageSize do
&#9;&#9;&#9;if insertButtons[index] then
&#9;&#9;&#9;&#9;if contents[index + dataOffset] then
&#9;&#9;&#9;&#9;&#9;local assetId
&#9;&#9;&#9;&#9;&#9;if useAssetVersionId then
&#9;&#9;&#9;&#9;&#9;&#9;assetId = contents[index + dataOffset].AssetVersionId
&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;assetId = contents[index + dataOffset].AssetId
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;setInsertButtonImageBehavior(insertButtons[index], true, contents[index + dataOffset].Name, assetId)
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;setInsertButtonImageBehavior(insertButtons[index], false)
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;else
&#9;&#9;currStampGui.InsertPanel.PagingControls.PreviousPageButton.Visible = false
&#9;&#9;currStampGui.InsertPanel.PagingControls.NextPageButton.Visible = false
&#9;end
end
function moveLoadingLeft()
&#9;if (tick() - startTime &gt; 5) and (currStampGui.Parent ~= nil) then
&#9;&#9;loading = false
&#9;&#9;cancelAssetPlacement()
&#9;&#9;goToInsertPanel()
&#9;end
&#9;if loading then
&#9;&#9;currStampGui.LoadDialog.LoadLabel:TweenPosition(UDim2.new(0, 0, 0, -8),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.7,true,function() moveLoadingRight() end)
&#9;end
end
function moveLoadingRight()
&#9;if (tick() - startTime &gt; 5) and (currStampGui.Parent ~= nil) then
&#9;&#9;loading = false
&#9;&#9;cancelAssetPlacement()
&#9;&#9;goToInsertPanel()
&#9;end
&#9;if loading then
&#9;&#9;currStampGui.LoadDialog.LoadLabel:TweenPosition(UDim2.new(0, 180, 0, -8),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.7,true,function() moveLoadingLeft() end)
&#9;end
end
function moveLoadingWindow()
&#9;startTime = tick()
&#9;currStampGui.LoadDialog.Visible = true
&#9;loading = true
&#9;moveLoadingRight()
end
function cancelLoadingWindow()
&#9;currStampGui.LoadDialog.Visible = false
&#9;loading = false
end
function selectCategoryPage(buttons, page)
&#9;if buttons ~= Data.CurrentCategory then
&#9;&#9;if Data.CurrentCategory then
&#9;&#9;&#9;for key, button in pairs(Data.CurrentCategory) do
&#9;&#9;&#9;&#9;button.Visible = false
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;Data.CurrentCategory = buttons
&#9;&#9;if Data.Category[Data.CurrentCategory] == nil then
&#9;&#9;&#9;Data.Category[Data.CurrentCategory] = {}
&#9;&#9;&#9;if #buttons &gt; 0 then
&#9;&#9;&#9;&#9;selectSet(buttons[1], buttons[1].SetName.Value, buttons[1].SetId.Value, 0)
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;Data.Category[Data.CurrentCategory].Button = nil
&#9;&#9;&#9;selectSet(Data.Category[Data.CurrentCategory].ButtonFrame, Data.Category[Data.CurrentCategory].SetName, Data.Category[Data.CurrentCategory].SetId, Data.Category[Data.CurrentCategory].Index)
&#9;&#9;end
&#9;&#9;if Data.Main.FrameHeight then
&#9;&#9;&#9;if Data.Category[Data.CurrentCategory].SetIndex then
&#9;&#9;&#9;&#9;layoutSetButtons(Data.Main.FrameHeight, Data.Category[Data.CurrentCategory].SetIndex)
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;layoutSetButtons(Data.Main.FrameHeight, 1)
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
end
function selectSet(button, setName, setId, setIndex)
&#9;if button and Data.Category[Data.CurrentCategory] ~= nil then
&#9;&#9;if button ~= Data.Category[Data.CurrentCategory].Button then
&#9;&#9;&#9;Data.Category[Data.CurrentCategory].Button = button
&#9;&#9;&#9;if SetCache[setId] == nil then
&#9;&#9;&#9;&#9;SetCache[setId] = game:GetService(&quot;InsertService&quot;):GetCollection(setId)
&#9;&#9;&#9;end
&#9;&#9;&#9;Data.Category[Data.CurrentCategory].Contents = SetCache[setId]
&#9;&#9;&#9;Data.Category[Data.CurrentCategory].SetName = setName
&#9;&#9;&#9;Data.Category[Data.CurrentCategory].SetId = setId
&#9;&#9;end
&#9;&#9;setSetIndex(setIndex)
&#9;end
end
function selectCategory(button, category)
&#9;selectCategoryPage(category, 0)
end
function processCategory(sets, setPanel)
&#9;local setButtons = {}
&#9;local numSkipped = 0
&#9;for index, object in pairs(sets) do
&#9;&#9;if not showAdminCategories.Value and object.Name == &quot;Beta&quot; then
&#9;&#9;&#9;-- skip this if not an admin
&#9;&#9;&#9;numSkipped = numSkipped + 1
&#9;&#9;else
&#9;&#9;&#9;setButtons[index - numSkipped] = buildSetButton(object.Name, object.CategoryId, object.ImageAssetId, index - numSkipped, #sets)
&#9;&#9;&#9;setButtons[index - numSkipped].Parent = setPanel
&#9;&#9;end
&#9;end
&#9;return setButtons
end
function setsNextPageClick(totalSetPages, gridSize)
&#9;-- set our logic/gui correctly
&#9;if currSetPage &gt;= totalSetPages then return end
&#9;currSetPage = currSetPage + 1
&#9;currStampGui.InsertPanel.PagingControls.PageText.Text = tostring(currSetPage) .. &quot;/&quot; .. tostring(totalSetPages)
&#9;if currSetPage == totalSetPages then
&#9;&#9;currStampGui.InsertPanel.PagingControls.NextPageButton.Visible = false
&#9;&#9;currStampGui.InsertPanel.PagingControls.PreviousPageButton.Visible = true
&#9;else
&#9;&#9;Window.Sets.PagingControls.NextPageButton.Visible = true
&#9;end
&#9;
&#9;-- actually update the items
&#9;makeCurrentSetsPageVisible(gridSize)
end
function setsPrevPageClick(totalSetPages, gridSize)
&#9;-- set our logic/gui correctly
&#9;if currSetPage &lt;= 1 then return end
&#9;currSetPage = currSetPage - 1
&#9;currStampGui.InsertPanel.PagingControls.PageText.Text = tostring(currSetPage) .. &quot;/&quot; .. tostring(totalSetPages)
&#9;if currSetPage == 1 then
&#9;&#9;currStampGui.InsertPanel.PagingControls.NextPageButton.Visible = true
&#9;&#9;currStampGui.InsertPanel.PagingControls.PreviousPageButton.Visible = false
&#9;else
&#9;&#9;currStampGui.InsertPanel.PagingControls.PreviousPageButton.Visible = true
&#9;end
&#9;-- actually update the items
&#9;makeCurrentSetsPageVisible(gridSize)
end
function resetAllSetButtonSelection()
&#9;local setButtons = Window.Sets.SetsLists:GetChildren()
&#9;for i = 1, #setButtons do
&#9;&#9;setButtons[i].Selected = false
&#9;&#9;setButtons[i].BackgroundTransparency = 1
&#9;&#9;setButtons[i].TextColor3 = Color3.new(1,1,1)
&#9;&#9;setButtons[i].BackgroundColor3 = Color3.new(1,1,1)
&#9;end
end
function populateSetsFrame()
&#9;local categories = #Data.UserCategoryButtons
&#9;local robloxMaxCat = categories
&#9;
&#9;-- don&apos;t do anything until window is visible (otherwise we won&apos;t layout anything!)
&#9;while Window.Sets.SetsLists.AbsoluteSize.X &lt;= 0 do
&#9;&#9;Window.Sets.SetsLists.Changed:wait()
&#9;end
&#9;while Window.Sets.SetsLists.SetButtonExample.AbsoluteSize.X &lt;= 0 do
&#9;&#9;Window.Sets.SetsLists.SetButtonExample.Changed:wait()
&#9;end
&#9;local totalColumns = math.floor(Window.Sets.SetsLists.AbsoluteSize.X/Window.Sets.SetsLists.SetButtonExample.AbsoluteSize.X)
&#9;local totalRows = math.floor(Window.Sets.SetsLists.AbsoluteSize.Y/Window.Sets.SetsLists.SetButtonExample.AbsoluteSize.Y)
&#9;
&#9;local currRow = 0
&#9;local buttonVisible = true
&#9;local masterCategory = 1
&#9;for i = 1, categories do
&#9;&#9;local userCategory = masterCategory -- needed to maintain local scope for categories in event listeners below
&#9;&#9;local button = Window.Sets.SetsLists.SetButtonExample:clone()
&#9;&#9;button.Name = &quot;Set&quot; .. tostring(Data.UserCategoryButtons[userCategory].SetName.Value) .. &quot;Button&quot;
&#9;&#9;button.Parent = Window.Sets.SetsLists
&#9;&#9;button.Position = UDim2.new(0,5,0,currRow * button.AbsoluteSize.Y)
&#9;&#9;button.Visible = buttonVisible
&#9;&#9;button.Text = tostring(Data.UserCategoryButtons[userCategory].SetName.Value)
&#9;&#9;if i == 1 then
&#9;&#9;&#9;button.Selected = true
&#9;&#9;&#9;button.BackgroundColor3 = Color3.new(0,204/255,0)
&#9;&#9;&#9;button.TextColor3 = Color3.new(0,0,0)
&#9;&#9;&#9;button.BackgroundTransparency = 0
&#9;&#9;end
&#9;&#9;button.MouseEnter:connect(function()
&#9;&#9;&#9;if not button.Selected then
&#9;&#9;&#9;&#9;button.BackgroundTransparency = 0
&#9;&#9;&#9;&#9;button.TextColor3 = Color3.new(0,0,0)
&#9;&#9;&#9;end
&#9;&#9;end)
&#9;&#9;button.MouseLeave:connect(function()
&#9;&#9;&#9;if not button.Selected then
&#9;&#9;&#9;&#9;button.BackgroundTransparency = 1
&#9;&#9;&#9;&#9;button.TextColor3 = Color3.new(1,1,1)
&#9;&#9;&#9;end
&#9;&#9;end)
&#9;&#9;setButtonCons[i] = button.MouseButton1Click:connect(function()
&#9;&#9;&#9;resetAllSetButtonSelection()
&#9;&#9;&#9;button.Selected = not button.Selected
&#9;&#9;&#9;button.BackgroundColor3 = Color3.new(0,204/255,0)
&#9;&#9;&#9;button.TextColor3 = Color3.new(0,0,0)
&#9;&#9;&#9;button.BackgroundTransparency = 0
&#9;&#9;&#9;selectSet(button, button.Text, Data.UserCategoryButtons[userCategory].SetId.Value, 0)
&#9;&#9;end)
&#9;&#9;
&#9;&#9;masterCategory = masterCategory + 1
&#9;&#9;currRow = currRow + 1
&#9;end
&#9;
&#9;-- don&apos;t use example button as the first set!
&#9;local example = currStampGui.InsertPanel.Sets.SetsLists.SetButtonExample
&#9;currStampGui.InsertPanel.Sets.SetsLists.SetButtonExample.Parent = nil
&#9;local buttons = currStampGui.InsertPanel.Sets.SetsLists:GetChildren()
&#9;example.Parent = currStampGui.InsertPanel.Sets.SetsLists
&#9;-- set first category as loaded for default
&#9;selectSet(buttons[1], buttons[1].Text, Data.UserCategoryButtons[1].SetId.Value, 0)
&#9;selectCategory(buttons[1], Data.UserCategoryButtons)
end
function layoutSetButtons(frameHeight, setIndex)
&#9;Data.Main.FrameHeight = frameHeight
&#9;Data.Main.InsertSets = math.floor(frameHeight / (height*2))
&#9;if #Data.CurrentCategory &gt; Data.Main.InsertSets then
&#9;&#9;--Steal one entry since we have too many things
&#9;&#9;Data.Main.InsertSets = Data.Main.InsertSets - 1
&#9;end
&#9;Data.Category[Data.CurrentCategory].SetIndex = setIndex
end
function showLargePreview(insertButton)
&#9;if insertButton:FindFirstChild(&quot;AssetId&quot;) then
&#9;&#9;delay(0,function()
&#9;&#9;&#9;game:GetService(&quot;ContentProvider&quot;):Preload(LargeThumbnailUrl .. tostring(insertButton.AssetId.Value))
&#9;&#9;&#9;currStampGui.InsertPanel.ItemPreview.LargePreview.Image = LargeThumbnailUrl .. tostring(insertButton.AssetId.Value)
&#9;&#9;end)
&#9;end
&#9;if insertButton:FindFirstChild(&quot;AssetName&quot;) then
&#9;&#9;currStampGui.InsertPanel.ItemPreview.TextPanel.RolloverText.Text = insertButton.AssetName.Value
&#9;end
end
function buildInsertButton(buttonPosition)
&#9;local insertButton = currStampGui.InsertPanel.ItemsFrame.InsertAssetButtonExample:clone()
&#9;insertButton.Position = buttonPosition
&#9;insertButton.Name = &quot;InsertAssetButton&quot;
&#9;insertButton.Visible = true
&#9;local mouseEnterCon = insertButton.MouseEnter:connect(function()
&#9;&#9;lastEnter = insertButton
&#9;&#9;delay(0.1,function()
&#9;&#9;&#9;if lastEnter == insertButton then
&#9;&#9;&#9;&#9;showLargePreview(insertButton)
&#9;&#9;&#9;end
&#9;&#9;end)
&#9;end)
&#9;return insertButton, mouseEnterCon
end
function minimizeStamperPanel()
&#9;currStampGui.StamperPanel.StamperButtons.Visible = false
&#9;currStampGui.StamperPanel.MinimizeButton.Visible = false
&#9;if currStampGui.Parent ~= nil then
&#9;&#9;currStampGui.StamperPanel:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0.5,0,1,-92),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.5,true)
&#9;&#9;delay(0.5,function()
&#9;&#9;&#9;currStampGui.StamperPanel.RestoreButton.Visible = true
&#9;&#9;end)
&#9;end
end
function restoreStamperPanel()
&#9;currStampGui.StamperPanel.RestoreButton.Visible = false
&#9;if currStampGui.Parent ~= nil then
&#9;&#9;currStampGui.StamperPanel:TweenSizeAndPosition(UDim2.new(0,350,0,48), UDim2.new(0.5,-175,1,-135), Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,0.5,true)
&#9;&#9;delay(0.5,function()
&#9;&#9;&#9;currStampGui.StamperPanel.StamperButtons.Visible = true
&#9;&#9;&#9;currStampGui.StamperPanel.MinimizeButton.Visible = true
&#9;&#9;end)
&#9;end
end
function setUpStamperGui()
&#9;pcall(function() currStampGui.InsertPanel.CancelButton.Modal = true end)
&#9;Window.Sets = currStampGui.InsertPanel.Sets
&#9;cloneButtonCon = currStampGui.StamperPanel.StamperButtons.CloneButton.MouseButton1Click:connect(goToClone)
&#9;partListClickCon = currStampGui.StamperPanel.StamperButtons.PartsButton.MouseButton1Click:connect(goToInsertPanel)
&#9;Data.Main = {}
&#9;Data.Category = {}
&#9;Data.Stamp = {}
&#9;Data.BaseCategoryButtons = {}
&#9;local userData = {}
&#9;for id = 1, #userIdsForStamperParts do
&#9;&#9;local newUserData = game:GetService(&quot;InsertService&quot;):GetUserCategories(userIdsForStamperParts[id].Value)
&#9;&#9;if newUserData and #newUserData &gt; 2 then
&#9;&#9;&#9;-- start at #3 to skip over My Decals and My Models for each account
&#9;&#9;&#9;for category = 3, #newUserData do
&#9;&#9;&#9;&#9;if newUserData[category].Name == &quot;High Scalability&quot; then
&#9;&#9;&#9;&#9;&#9;table.insert(userData,1,newUserData[category])
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;table.insert(userData, newUserData[category])
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;
&#9;if userData then
&#9;&#9;Data.UserCategoryButtons = processCategory(userData, setPanel)
&#9;end
&#9;guiChangedCon = currStampGui.Changed:connect(function(prop)
&#9;&#9;if prop == &quot;AbsoluteSize&quot; then
&#9;&#9;&#9;wait()
&#9;&#9;&#9;setSetIndex(0)
&#9;&#9;end
&#9;end)
&#9;InsertRows = math.floor(currStampGui.InsertPanel.ItemsFrame.AbsoluteSize.Y/buttonHeight)
&#9;InsertColumns = math.floor(currStampGui.InsertPanel.ItemsFrame.AbsoluteSize.X/buttonWidth)
&#9;populateSetsFrame()
&#9;setsPrevPageCon = currStampGui.InsertPanel.PagingControls.PreviousPageButton.MouseButton1Click:connect(function() previousSetPage() end)
&#9;setsNextPageCon = currStampGui.InsertPanel.PagingControls.NextPageButton.MouseButton1Click:connect(function() nextSetPage() end)
&#9;insertPanelCloseCon = currStampGui.InsertPanel.CancelButton.MouseButton1Click:connect(function()
&#9;&#9;closeInsertPanel()
&#9;&#9;closeClonePanel()
&#9;&#9;reloadCurrentAsset()
&#9;end)
&#9;minimizeCon = currStampGui.StamperPanel.MinimizeButton.MouseButton1Click:connect(function() minimizeStamperPanel() end)
&#9;restoreCon = currStampGui.StamperPanel.RestoreButton.MouseButton1Click:connect(function() restoreStamperPanel() end)
end
-- signal to scripts we are ready to start manipulating objects
function signalStamperScript(assetName, assetId, image, stampMode)
&#9;insertAsset.AssetName.Value = assetName
&#9;insertAsset.AssetId.Value = assetId
&#9;insertAsset.Image.Value = image
&#9;insertAsset.StampMode.Value = stampMode
&#9;insertAsset.Updated.Value = true
end
function reloadCurrentAsset()
&#9;variables.ReloadCurrentAsset.Value = true
end
function beginInsertAssetGui(assetName, assetId, image, stampMode)
&#9;Data.Stamp.StampMode = stampMode
&#9;closeInsertPanel()
&#9;signalStamperScript(&quot;&quot;,0,&quot;&quot;,&quot;&quot;,false)
&#9;moveLoadingWindow()
&#9;cancelAssetPlacement()
&#9;signalStamperScript(assetName, assetId, image, stampMode)
end
function cancelAssetLoad()
&#9;Data.Loading.Cancelled = true
&#9;insertComplete()
&#9;gInitial90DegreeRotations = 0
end
function inBounds2(part)
&#9;-- part must have a position property
&#9;local xOne= buildingPlate.Position.x + buildingPlate.Size.x/2
&#9;local xTwo = buildingPlate.Position.x - buildingPlate.Size.x/2
&#9;local zOne = buildingPlate.Position.z + buildingPlate.Size.z/2
&#9;local zTwo = buildingPlate.Position.z - buildingPlate.Size.z/2
&#9;if part.Position.x &gt; xOne or part.Position.x &lt; xTwo then return false end
&#9;if part.Position.z &gt; zOne or part.Position.z &lt; zTwo then return false end
&#9;return true
end
-- For Restricting Stamper Tool (isRestricted)
function showHelp_pointToBuildingplate()
&#9;if(buildingPlate==nil) then
&#9;&#9;hint(&quot;All building areas are taken. If you want to build, leave and join again.&quot;)
&#9;else
&#9;&#9;-- only show one waypoint at a time (because kids will click a million times outside their plate)
&#9;&#9;hint(&quot;Stamper Tool only works in your area.&quot;)
&#9;&#9;if(not waypointShowing) then
&#9;&#9;&#9;waypointShowing = true
&#9;&#9;&#9;local _character = Tool.Parent
&#9;&#9;&#9;waitForChild(_character, &quot;Torso&quot;)
&#9;&#9;&#9;_player = game.Players:GetPlayerFromCharacter(_character)
&#9;&#9;&#9;_player.PlayerGui.showBaseplateWaypoint.target.Value = buildingPlate
&#9;&#9;&#9;_player.PlayerGui.showBaseplateWaypoint.Disabled = true
&#9;&#9;&#9;_player.PlayerGui.showBaseplateWaypoint.Disabled = false
&#9;&#9;&#9;-- Wait until character moves in bounds (check every 2 seconds)
&#9;&#9;&#9;while(not inBounds2(_character.Torso) and isEquipped) do&#9;wait(2) end
&#9;&#9;&#9;-- Then hide the waypoint
&#9;&#9;&#9;hideHelp_pointToBuildingplate()
&#9;&#9;end
&#9;end
end
function showHelp_tooManyParts()
&#9;hint(&quot;You have reached maximum number of parts! Delete some to put more down.&quot;)
end
function hideHelp_pointToBuildingplate()
&#9;waypointShowing = false
&#9;_player.PlayerGui.hideBaseplateWaypoint.Disabled = true
&#9;_player.PlayerGui.hideBaseplateWaypoint.Disabled = false&#9;&#9;
end
function setUpRestrictions()
&#9;playerModel = game.Workspace.ActiveParts:FindFirstChild(player.Name .. &quot;&apos;s parts&quot;)
&#9;local takenAreas = game.Workspace.BuildingAreas:GetChildren()
&#9;waitForChild(player, &quot;playerNumber&quot;)
&#9;&#9;
&#9;if(player.playerNumber.Value == 0) then
&#9; buildingPlate = nil
&#9; partModel = nil
&#9;else
&#9; waitForChild(game.Workspace, &quot;BuildingAreas&quot;)
&#9; local buildingAreas = game.Workspace.BuildingAreas
&#9; waitForChild(buildingAreas, &quot;Area&quot;..tostring(player.playerNumber.Value))
&#9; local targetArea = buildingAreas:FindFirstChild(&quot;Area&quot;..tostring(player.playerNumber.Value))
&#9; waitForChild(targetArea, &quot;PlayerArea&quot;)
&#9; waitForChild(targetArea.PlayerArea, &quot;BasePlate&quot;)
&#9; buildingPlate = targetArea.PlayerArea.BasePlate
&#9; partModel = targetArea.PlayerArea
&#9;&#9;&#9;
&#9;end
&#9;-- Check if player is standing in bounds, if not show error
&#9;local _character = Tool.Parent
&#9;waitForChild(_character, &quot;Torso&quot;)
&#9;_player = game.Players:GetPlayerFromCharacter(_character)
&#9;if(buildingPlate~=nil) then
&#9;&#9;if(not inBounds2(_character.Torso)) then
&#9;&#9;&#9;showHelp_pointToBuildingplate()
&#9;&#9;end
&#9;else
&#9;&#9;-- You have no building plate.
&#9;&#9;hint(&quot;All building areas are taken. If you want to build, leave and join again.&quot;)
&#9;end
end
function onInsertKeyDown(key)
&#9;if loading then return end -- don&apos;t try to switch while we&apos;re loading
&#9;key = string.lower(key)
&#9;-- go to mru buttons
&#9;if key == &apos;f&apos; then
&#9;&#9;mruButtonClick(1)
&#9;elseif key == &apos;g&apos; then
&#9;&#9;mruButtonClick(2)
&#9;elseif key == &apos;h&apos; then
&#9;&#9;mruButtonClick(3)
&#9;elseif key == &apos;j&apos; then
&#9;&#9;mruButtonClick(4)
&#9;end
end
function onEquippedLocal(mouse)
&#9;player = getPlayer()
&#9;if not player then
&#9;&#9;return
&#9;end
&#9;if Tool.PlayerOwner.Value and Tool.PlayerOwner.Value ~= player then return end
&#9;-- For Restricting Stamper Tool
&#9;if isRestricted.Value then
&#9;&#9;setUpRestrictions()
&#9;end
&#9;Mouse = mouse
&#9;if not firstEquip and currStampGui and Tool.SavedState.Value and Tool.PlayerOwner.Value == getPlayer() and Data and Data.FullyLoaded then
&#9;&#9;currStampGui.Parent = getPlayer().PlayerGui
&#9;&#9;if mode == 1 then -- if we were stamping, keep going
&#9;&#9;&#9;-- if we signal a negative asset, then that means keep going using whatever was in recent memory [don&apos;t reload from insert service]
&#9;&#9;&#9;signalStamperScript(insertAsset.AssetName.Value, -1, insertAsset.Image.Value, true)&#9;&#9;&#9;
&#9;&#9;elseif mode == 2 then -- time to clone
&#9;&#9;&#9;goToClone()
&#9;&#9;end
&#9;else
&#9;&#9;if firstEquip then
&#9;&#9;&#9;Tool.PlayerOwner.Value = player
&#9;&#9;&#9;firstEquip = false
&#9;&#9;end
&#9;&#9;CancelDuringLoad = false
&#9;&#9;resetCons()
&#9;&#9;Data = {}
&#9;&#9;Data.FullyLoaded = false
&#9;&#9;&#9;&#9;
&#9;&#9;Window = {}
&#9;&#9;Window.Sets = {}
&#9;&#9;currStampGui = stamperGui:clone()
&#9;&#9;currStampGui.Parent = getPlayer().PlayerGui
&#9;&#9;wait()
&#9;&#9;setUpStamperGui()
&#9;&#9;if not(CancelDuringLoad) then
&#9;&#9;&#9;currStampGui.Parent = getPlayer().PlayerGui
&#9;&#9;&#9;Tool.SavedState.Value = currStampGui
&#9;&#9;end
&#9;&#9;Data.FullyLoaded = true
&#9;end
&#9;Mouse.KeyDown:connect(onInsertKeyDown)
end
function onUnequippedLocal()
&#9;if currStampGui then
&#9;&#9;Tool.SavedState.Value = currStampGui
&#9;&#9;currStampGui.Parent = nil
&#9;end
&#9;
&#9;pcall(function()
&#9;&#9;cancelAssetPlacement()
&#9;&#9;Data.Loading.Cancelled = true
&#9;end)
&#9;CancelDuringLoad = true
end
function killConnection(connection)
&#9;if connection then connection:disconnect() end
end
function resetCons()
&#9;killConnection(guiChangedCon)
&#9;killConnection(cloneButtonCon)
&#9;killConnection(partListClickCon)
&#9;killConnection(itemFrameChangedCon)
&#9;killConnection(setsPrevPageCon)
&#9;killConnection(setsNextPageCon)
&#9;killConnection(insertPanelCloseCon)
&#9;killConnection(minimizeCon)
&#9;killConnection(restoreCon)
end
function onAncestryChanged(child,parent)
&#9;if Tool.PlayerOwner.Value and not Tool:IsDescendantOf(Tool.PlayerOwner.Value) and not Tool:IsDescendantOf(Tool.PlayerOwner.Value.Character) then
&#9;&#9;--Tool was dropped in some way, so we need to nuke our external state
&#9;&#9;Tool.SavedState.Value = nil
&#9;&#9;resetCons()
&#9;end
end
function getMaxNumOfRecentParts()
&#9;return maxRecentParts
end
function pushRecentStackBack()
&#9;for i = getMaxNumOfRecentParts() - 1, 1, -1 do
&#9;&#9;recentPartStack[i + 1].AssetNameValue = recentPartStack[i].AssetNameValue
&#9;&#9;recentPartStack[i + 1].AssetIdValue = recentPartStack[i].AssetIdValue
&#9;&#9;recentPartStack[i + 1].InsertFrameButtonImage = recentPartStack[i].InsertFrameButtonImage
&#9;end
end
function clearMRUList()
&#9;local buttons = currStampGui.StamperPanel.StamperButtons.RecentFrame:GetChildren()
&#9;for i = 1, #buttons do
&#9;&#9;if recentPartStackCons[i] then recentPartStackCons[i]:disconnect() end
&#9;&#9;buttons[i].Visible = false
&#9;end
end
function mruButtonClick(position)
&#9;if recentPartStack[position].AssetIdValue == insertAsset.AssetId.Value then return end -- already stamping part
&#9;-- get rid of old part
&#9;signalStamperScript(&quot;&quot;,0,&quot;&quot;,&quot;&quot;,false)
&#9;--Show the dialog window
&#9;moveLoadingWindow()
&#9;signalStamperScript(recentPartStack[position].AssetNameValue, recentPartStack[position].AssetIdValue, recentPartStack[position].InsertFrameButtonImage, true)
end
function insertMRUButton(position)
&#9;local mruButton = currStampGui.StamperPanel.StamperButtons.RecentFrame:FindFirstChild(&quot;Button&quot; .. tostring(position))
&#9;mruButton.ButtonImage.Image = recentPartStack[position].InsertFrameButtonImage
&#9;if mruButton.ButtonImage.Image == &quot;&quot; then
&#9;&#9;mruButton.Text = recentPartStack[position].AssetNameValue
&#9;end
&#9;if recentPartStackCons[position] then pcall(function() recentPartStackCons[position]:Disconnect() end) end
&#9;recentPartStackCons[position] = mruButton.MouseButton1Click:connect(function() mruButtonClick(position) end)
&#9;mruButton.Visible = true
end
function refreshRecentParts()
&#9;if insertAsset.Image.Value == &quot;&quot; then return end -- we don&apos;t have an asset, get out of here
&#9;if not recentPartStack then return end -- if somehow not created yet (recentPartStack[i] calls below were nil somehow)
&#9;
&#9;local numOfRecentParts = getMaxNumOfRecentParts()
&#9;for i = 1,numOfRecentParts do
&#9;&#9;if insertAsset.AssetId and recentPartStack[i] and insertAsset.AssetId.Value == recentPartStack[i].AssetIdValue then -- already have part, don&apos;t push back
&#9;&#9;&#9;return
&#9;&#9;end
&#9;end
&#9;pushRecentStackBack()
&#9;-- update our stack to show previously allocated part
&#9;recentPartStack[1].AssetNameValue = insertAsset.AssetName.Value
&#9;recentPartStack[1].AssetIdValue = insertAsset.AssetId.Value
&#9;recentPartStack[1].InsertFrameButtonImage = insertAsset.Image.Value
&#9;clearMRUList()
&#9;for i = 1, numOfRecentParts do
&#9;&#9;if recentPartStack[i] and recentPartStack[i].AssetIdValue ~= &quot;&quot; then
&#9;&#9;&#9;insertMRUButton(i)
&#9;&#9;end
&#9;end
end
function updateGui(type)
&#9;if type == &quot;Main&quot; then
&#9;&#9;goToInsertPanel()
&#9;elseif type == &quot;EyeDropper&quot; then
&#9;&#9;goToClone()
&#9;elseif type == &quot;SideDialog&quot; then
&#9;&#9;goToStamp()
&#9;end
end
----------------------------------------------------------------------------------------
-- Lua Start Execution
setAssetUrls()
Tool.Equipped:connect(onEquippedLocal)
Tool.Unequipped:connect(onUnequippedLocal)
Tool.AncestryChanged:connect(onAncestryChanged)
waitForChild(variables, &quot;SwitchLoaderToDialog&quot;)
variables.SwitchLoaderToDialog.Changed:connect(function(prop)
&#9;if variables.SwitchLoaderToDialog.Value == true then
&#9;&#9;updateGui(variables.SwitchLoaderToDialog.DialogType.Value)
&#9;&#9;variables.SwitchLoaderToDialog.Value = false
&#9;end
end)
waitForChild(variables, &quot;ShowInvalidPlacement&quot;)
variables.ShowInvalidPlacement.Changed:connect(function(prop)
&#9;if variables.ShowInvalidPlacement.Value == true then
&#9;&#9;showHelp_pointToBuildingplate()
&#9;&#9;showBaseplateGuideArrows()
&#9;&#9;variables.ShowInvalidPlacement.Value = false
&#9;end
end)
waitForChild(variables, &quot;ShowMaxedOut&quot;)
variables.ShowMaxedOut.Changed:connect(function(prop)
&#9;if variables.ShowMaxedOut.Value == true then
&#9;&#9;showHelp_tooManyParts()
&#9;&#9;variables.ShowMaxedOut.Value = false
&#9;end
end)
waitForChild(variables, &quot;Stamped&quot;)
variables.Stamped.Changed:connect(function()
&#9;if variables.Stamped.Value == true then
&#9;&#9;refreshRecentParts()
&#9;end
end)
----------------------------------------------------------------------------------------</ProtectedString>
</Properties>
</Item>
<Item class="LocalScript" referent="RBX99">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Readme</string>
<ProtectedString name="Source">--[[
&#9;Stamper Tool v1.0.0
&#9;
&#9;Welcome to the stamper tool readme!
&#9;Currently, this doc only exists to show the Stamper Tool Version!
]] </ProtectedString>
</Properties>
</Item>
<Item class="LocalScript" referent="RBX100">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">StampScript</string>
<ProtectedString name="Source">-- basic functions
function waitForChild(instance, name)
&#9;while not instance:findFirstChild(name) do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
----------------------------------------------------------------------------------------
-- Locals
local Tool = script.Parent
local Mouse
local mouseMoveCon
local mouseButton1DownCon
local mouseButton1UpCon
local cameraChangeCon
local walking = false
local pressedEsc = false
local billBoardOwnerGui = nil
local cluster = game.Workspace:FindFirstChild(&quot;Terrain&quot;)
local gInitial90DegreeRotations = 0
local gStaticTrans = 1
local gDesiredTrans = 0.7
local transFadeInTime = 0.5
local fadeInDelayTime = 0.5
local eyedropperOffGridTolerance = 0.01
local insertBoundingBoxOverlapVector = Vector3.new(1, 1, 1) -- we can still stamp if our character extrudes into the target stamping space by 1 or fewer units
local useAssetVersionId = false
-- for high-scalability display
local adornPart = Instance.new(&quot;Part&quot;)
adornPart.Parent = nil
adornPart.formFactor = &quot;Custom&quot;
adornPart.Size = Vector3.new(4, 4, 4)
adornPart.CFrame = CFrame.new()
local adorn = Instance.new(&quot;SelectionBox&quot;)
adorn.Color = BrickColor.new(&quot;Toothpaste&quot;)
adorn.Adornee = adornPart
adorn.Visible = true
adorn.Transparency = 0
adorn.Name = &quot;HighScalabilityStamperLine&quot;
adorn.Parent = nil
local terrainSelectionBox = Instance.new(&quot;Part&quot;)
terrainSelectionBox.Parent = nil
terrainSelectionBox.formFactor = &quot;Custom&quot;
terrainSelectionBox.Size = Vector3.new(4, 4, 4)
terrainSelectionBox.CFrame = CFrame.new()
local HighScalabilityLine = {}
HighScalabilityLine.Start = nil
HighScalabilityLine.End = nil
HighScalabilityLine.Adorn = adorn
HighScalabilityLine.AdornPart = adornPart
HighScalabilityLine.InternalLine = nil
HighScalabilityLine.NewHint = true
-- for higher dimensional megacluster part stamping
HighScalabilityLine.MorePoints = {nil, nil}
HighScalabilityLine.MoreLines = {nil, nil}
HighScalabilityLine.Dimensions = 1
waitForChild(Tool,&quot;LuaGlobalVariables&quot;)
local variables = Tool.LuaGlobalVariables
waitForChild(variables,&quot;ShowInvalidPlacement&quot;)
waitForChild(variables, &quot;Stamped&quot;)
waitForChild(Tool,&quot;ErrorBox&quot;)
waitForChild(variables, &quot;ShowAdminCategories&quot;)
local errorBox = Tool.ErrorBox
waitForChild(variables, &quot;IsRestricted&quot;)
waitForChild(variables, &quot;MouseClick&quot;)
click = variables.MouseClick
local Data = {}
Data.Stamp = {}
Data.Loading = {}
local guiScriptIsLoadingSomething = false
local unstampableSurface = false
local eyeDropperConnection, eyeDropperMoveConnection
local playerModel
local player
local lastTargetCFrame = nil
local lastTargetTerrainOrientation = 0
-- For Restricting Stamper Tool
local isRestricted = variables.IsRestricted.Value
local adminAccess = variables.ShowAdminCategories.Value
-- For Delete highlighting
local selectionBox
local currentSelection
local currentSelectionColors = {}
if isRestricted then waitForChild(game.Workspace, &quot;BaseplateBumpers&quot;) end
----------------------------------------------------------------------------------------
-- Functions
function hint(label)
&#9;-- Pass in a string, it shows a top hint. (Replaces previous hint, if exists)
&#9;_player = game.Players:GetPlayerFromCharacter(Tool.Parent)
&#9;if(_player.PlayerGui:FindFirstChild(&quot;topHint&quot;)~=nil) then
&#9;&#9;local topHint = _player.PlayerGui.topHint
&#9;&#9;topHint.Add.Label.Value = label
&#9;&#9;topHint.Add.Width.Value = 3 -- widest width
&#9;&#9;topHint.Add.Time.Value = 5
&#9;&#9;topHint.Add.Disabled = true
&#9;&#9;topHint.Add.Disabled = false
&#9;end
end
function getClosestColorToTerrainMaterial(terrainValue)
&#9;if terrainValue == 1 then
&#9;&#9;return BrickColor.new(&quot;Bright green&quot;)
&#9;elseif terrainValue == 2 then
&#9;&#9;return BrickColor.new(&quot;Bright yellow&quot;)
&#9;elseif terrainValue == 3 then
&#9;&#9;return BrickColor.new(&quot;Bright red&quot;)
&#9;elseif terrainValue == 4 then
&#9;&#9;return BrickColor.new(&quot;Medium stone grey&quot;)
&#9;else
&#9;&#9;return BrickColor.new(&quot;Bright green&quot;)
&#9;end
end
local manualWeldTable = {}
local manualWeldParentTable = {}
function saveTheWelds(object)
&#9;if object:IsA(&quot;ManualWeld&quot;) or object:IsA(&quot;Rotate&quot;) then
&#9;&#9;table.insert(manualWeldTable, object)
&#9;&#9;table.insert(manualWeldParentTable, object.Parent)
&#9;else
&#9;&#9;local children = object:GetChildren()
&#9;&#9;for i = 1, #children do
&#9;&#9;&#9;saveTheWelds(children[i])
&#9;&#9;end
&#9;end
end
function restoreTheWelds()
&#9;for i = 1, #manualWeldTable do
&#9;&#9;manualWeldTable[i].Parent = manualWeldParentTable[i]
&#9;end
end
function findSeatsInModel(parent, seatTable)
&#9;if not parent then return end
&#9;if parent.className == &quot;Seat&quot; or parent.className == &quot;VehicleSeat&quot; then
&#9;&#9;table.insert(seatTable, parent)
&#9;end
&#9;local myChildren = parent:GetChildren()
&#9;for j = 1, #myChildren do
&#9;&#9;findSeatsInModel(myChildren[j], seatTable)
&#9;end
end
function setSeatEnabledStatus(model, isEnabled)
&#9;local seatList = {}
&#9;findSeatsInModel(model, seatList)
&#9;if isEnabled then
&#9;&#9;-- remove any welds called &quot;SeatWeld&quot; in seats
&#9;&#9;for i = 1, #seatList do
&#9;&#9;&#9;local nextSeat = seatList[i]:FindFirstChild(&quot;SeatWeld&quot;)
&#9;&#9;&#9;while nextSeat do nextSeat:Remove() nextSeat = seatList[i]:FindFirstChild(&quot;SeatWeld&quot;) end
&#9;&#9;end
&#9;else
&#9;&#9;-- put a weld called &quot;SeatWeld&quot; in every seat
&#9;&#9;-- this tricks it into thinking there&apos;s already someone sitting there, and it won&apos;t make you sit XD
&#9;&#9;for i = 1, #seatList do
&#9;&#9;&#9;local fakeWeld = Instance.new(&quot;Weld&quot;)
&#9;&#9;&#9;fakeWeld.Name = &quot;SeatWeld&quot;
&#9;&#9;&#9;fakeWeld.Parent = seatList[i]
&#9;&#9;end
&#9;end
end
function UnlockInstances(object)
&#9;if object:IsA(&quot;BasePart&quot;) then
&#9;&#9;object.Locked = false
&#9;end
&#9;for index,child in pairs(object:GetChildren()) do
&#9;&#9;UnlockInstances(child)
&#9;end
end
function generateOwnerGui(playerName)
&#9;local gui = Instance.new(&quot;BillboardGui&quot;)
&#9;gui.Name = &quot;PlayerStamperTagGui&quot;
&#9;gui.StudsOffset = Vector3.new(0,1,0)
&#9;gui.ExtentsOffset = Vector3.new(0,1,0)
&#9;gui.Size = UDim2.new(5,0,2,0)
&#9;pcall(function() gui.PlayerToHideFrom = game.Players.LocalPlayer end)
&#9;local frame = Instance.new(&quot;Frame&quot;)
&#9;frame.BackgroundColor3 = Color3.new(0,0,0)
&#9;frame.BackgroundTransparency = 0.5
&#9;frame.Name = &quot;OwnerFrame&quot;
&#9;frame.Size = UDim2.new(1,0,1,0)
&#9;frame.Parent = gui
&#9;
&#9;local ownerName = Instance.new(&quot;TextLabel&quot;)
&#9;ownerName.Name = &quot;OwnerName&quot;
&#9;ownerName.Size = UDim2.new(1,0,1,0)
&#9;ownerName.Text = playerName
&#9;ownerName.Font = Enum.Font.ArialBold
&#9;ownerName.FontSize = Enum.FontSize.Size14
&#9;ownerName.TextWrap = true
&#9;ownerName.TextColor3 = Color3.new(1,1,1)
&#9;ownerName.TextStrokeTransparency = 0
&#9;ownerName.BackgroundTransparency = 1
&#9;ownerName.Parent = frame
&#9;return gui
end
function getPlayer()
&#9;return game.Players:GetPlayerFromCharacter(script.Parent.Parent)
end
function beginInsertAssetStamp(assetName, assetId, image, stampMode)
&#9;-- trying to stop assets, gone back to Main Stamp Dialog
&#9;if assetId == 0 then
&#9;&#9;guiScriptIsLoadingSomething = true
&#9;&#9;cancelAssetPlacement()
&#9;&#9;return
&#9;end
&#9;if assetId &lt; 0 then
&#9;&#9;guiScriptIsLoadingSomething = true
&#9;&#9;cancelAssetPlacement()
&#9;&#9;setupDraggableClone()
&#9;&#9;wait() -- need this so onInsertMouseMove() can sync up with setupDraggableClone()
&#9;&#9;onInsertMouseMove()
&#9;&#9;guiScriptIsLoadingSomething = false
&#9;&#9;return
&#9;end
&#9;-- This call will cause a &quot;wait&quot; until the data comes back
&#9;-- below we wait a max of 8 seconds before deciding to bail out on loading
&#9;local root
&#9;local loader
&#9;loading = true
&#9;if useAssetVersionId then
&#9;&#9;loader = coroutine.create(function()&#9;
&#9;&#9;&#9;root = game:GetService(&quot;InsertService&quot;):LoadAssetVersion(assetId)
&#9;&#9;&#9;loading = false
&#9;&#9;end)
&#9;&#9;coroutine.resume(loader)
&#9;else
&#9;&#9;loader = coroutine.create(function()&#9;
&#9;&#9;&#9;root = game:GetService(&quot;InsertService&quot;):LoadAsset(assetId)
&#9;&#9;&#9;loading = false
&#9;&#9;end)
&#9;&#9;coroutine.resume(loader)
&#9;end
&#9;local lastGameTime = 0
&#9;local totalTime = 0
&#9;local maxWait = 8
&#9;while loading and totalTime &lt; maxWait do
&#9;&#9;lastGameTime = tick()
&#9;&#9;wait(1)
&#9;&#9;totalTime = totalTime + tick() - lastGameTime
&#9;end
&#9;loading = false
&#9;if totalTime &gt;= maxWait or pressedEsc then
&#9;&#9;Data.Loading.Cancelled = true
&#9;&#9;pressedEsc = false
&#9;else
&#9;&#9;Data.Loading.Cancelled = false
&#9;end
&#9;if Data.Loading.Cancelled then
&#9;&#9;--The user got bored and wandered off
&#9;&#9;--Just delete the model from the world... a shame we loaded it when they got bored
&#9;&#9;-- 12/28/2010: Putting this inside a pcall (on gametest, first time equipping stamper, this was being called with root=nil.) (Jahr)
&#9;&#9;pcall(function() root:Remove() end)
&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;else
&#9;&#9;if root == nil then
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;if not root:IsA(&quot;Model&quot;) then
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;local instances = root:GetChildren()
&#9;&#9;if #instances == 0 then
&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;--Unlock all parts that are inserted, to make sure they are editable
&#9;&#9;UnlockInstances(root)
&#9;&#9;--Continue the insert process
&#9;&#9;root.Name = &quot;InsertedObject&quot; .. assetId
&#9;&#9;--Examine the contents and decide what it looks like
&#9;&#9;for pos, instance in pairs(instances) do
&#9;&#9;&#9;--Single instance objects might be treated special, decals/skyboxes
&#9;&#9;&#9;if instance:IsA(&quot;Decal&quot;) then
&#9;&#9;&#9;&#9;--Current system here stops after finding one Decal (and gives you Decal tool)
&#9;&#9;&#9;&#9;--We should do the same (probably)
&#9;&#9;&#9;&#9;beginInsertDecal(instance)
&#9;&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;&#9;Window.Stamp.Frame.Visible = true
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;elseif instance:IsA(&quot;Team&quot;) then
&#9;&#9;&#9;&#9;instance.Parent = game:GetService(&quot;Teams&quot;)
&#9;&#9;&#9;elseif instance:IsA(&quot;SpawnLocation&quot;) then
&#9;&#9;&#9;&#9;-- uh.............
&#9;&#9;&#9;elseif instance:IsA(&quot;HopperBin&quot;) then
&#9;&#9;&#9;&#9;-- Must go into the starterPack, prompt user?
&#9;&#9;&#9;elseif instance:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;&#9;-- Ask them if it should go in StarterPack?
&#9;&#9;&#9;elseif instance:IsA(&quot;Sky&quot;) then
&#9;&#9;&#9;&#9;local lightingService = game:GetService(&quot;Lighting&quot;)
&#9;&#9;&#9;&#9;for index,child in pairs(lightingService:GetChildren()) do
&#9;&#9;&#9;&#9;&#9;if child:IsA(&quot;Sky&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;child:Remove();
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;instance.Parent = lightingService
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;else
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;if #root:GetChildren() == 0 then
&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;signalInsertComplete(&quot;SideDialog&quot;)
&#9;&#9;
&#9;&#9;cancelAssetPlacement()
&#9;&#9;Data.Stamp.Model = root
&#9;&#9;setupDraggableClone()
&#9;&#9;guiScriptIsLoadingSomething = false
&#9;end
end
function beginInsertDecal(decal)
&#9;Data.Stamp.DecalSelection = Instance.new(&quot;SurfaceSelection&quot;)
&#9;Data.Stamp.DecalSelection.Color = BrickColor.new(&quot;Bright orange&quot;)
&#9;Data.Stamp.DecalSelection.archivable = false
&#9;Data.Stamp.DecalSelection.Parent = getPlayer().PlayerGui
&#9;--Save the decal in our Lua code for later use
&#9;Data.Stamp.Decal = decal
&#9;Data.Stamp.Decal.Parent = nil
end
-- signal to gui to switch frames
function signalInsertComplete(type)
&#9;if type == &quot;SideDialog&quot; then
&#9;&#9;variables.SwitchLoaderToDialog.DialogType.Value = &quot;SideDialog&quot;
&#9;&#9;variables.SwitchLoaderToDialog.Value = true
&#9;elseif type == &quot;Main&quot; then
&#9;&#9;variables.SwitchLoaderToDialog.DialogType.Value = &quot;Main&quot;
&#9;&#9;variables.SwitchLoaderToDialog.Value = true
&#9;elseif type == &quot;EyeDropper&quot; then
&#9;&#9;variables.SwitchLoaderToDialog.DialogType.Value = &quot;EyeDropper&quot;
&#9;&#9;variables.SwitchLoaderToDialog.Value = true
&#9;end
&#9;-- needed to make sure we disconnect eyedroper handler
&#9;if type ~= &quot;EyeDropper&quot; then
&#9;&#9;if eyeDropperConnection then
&#9;&#9;&#9;eyeDropperConnection:disconnect()
&#9;&#9;&#9;eyeDropperConnection = nil
&#9;&#9;end
&#9;&#9;if eyeDropperMoveConnection then eyeDropperMoveConnection:disconnect() end
&#9;&#9;if Mouse and not mouseButton1UpCon then mouseButton1UpCon = Mouse.Button1Up:connect(onInsertMouseButton1Up) end
&#9;end
&#9;clearSelection()
end
function p(assetName, assetId, image, stampMode)
&#9;-- trying to stop assets, gone back to Main Stamp Dialog
&#9;if assetId == 0 then
&#9;&#9;cancelAssetPlacement()
&#9;&#9;return
&#9;end
&#9;-- This call will cause a &quot;wait&quot; until the data comes back
&#9;-- below we wait a max of 8 seconds before deciding to bail out on loading
&#9;local root
&#9;local loader
&#9;loading = true
&#9;if useAssetVersionId then
&#9;&#9;loader = coroutine.create(function()
&#9;&#9;&#9;root = game:GetService(&quot;InsertService&quot;):LoadAssetVersion(assetId)
&#9;&#9;&#9;loading = false
&#9;&#9;end)
&#9;&#9;coroutine.resume(loader)
&#9;else
&#9;&#9;loader = coroutine.create(function()&#9;
&#9;&#9;&#9;root = game:GetService(&quot;InsertService&quot;):LoadAsset(assetId)
&#9;&#9;&#9;loading = false
&#9;&#9;end)
&#9;&#9;coroutine.resume(loader)
&#9;end
&#9;local lastGameTime = 0
&#9;local totalTime = 0
&#9;local maxWait = 8
&#9;while loading and totalTime &lt; maxWait do
&#9;&#9;lastGameTime = tick()
&#9;&#9;wait(1)
&#9;&#9;totalTime = totalTime + tick() - lastGameTime
&#9;end
&#9;loading = false
&#9;if totalTime &gt;= maxWait or pressedEsc then
&#9;&#9;Data.Loading.Cancelled = true
&#9;&#9;pressedEsc = false
&#9;else
&#9;&#9;Data.Loading.Cancelled = false
&#9;end
&#9;if Data.Loading.Cancelled then
&#9;&#9;--The user got bored and wandered off
&#9;&#9;--Just delete the model from the world... a shame we loaded it when they got bored
&#9;&#9;-- 12/28/2010: Putting this inside a pcall (on gametest, first time equipping stamper, this was being called with root=nil.) (Jahr)
&#9;&#9;pcall(function() root:Remove() end)
&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;else
&#9;&#9;local instances = root:GetChildren()
&#9;&#9;if #instances == 0 then
&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;--Unlock all parts that are inserted, to make sure they are editable
&#9;&#9;UnlockInstances(root)
&#9;&#9;--Continue the insert process
&#9;&#9;root.Name = &quot;InsertedObject&quot; .. assetId
&#9;&#9;--Examine the contents and decide what it looks like
&#9;&#9;for pos, instance in pairs(instances) do
&#9;&#9;&#9;--Single instance objects might be treated special, decals/skyboxes
&#9;&#9;&#9;if instance:IsA(&quot;Decal&quot;) then
&#9;&#9;&#9;&#9;--Current system here stops after finding one Decal (and gives you Decal tool)
&#9;&#9;&#9;&#9;--We should do the same (probably)
&#9;&#9;&#9;&#9;beginInsertDecal(instance)
&#9;&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;&#9;Window.Stamp.Frame.Visible = true
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;elseif instance:IsA(&quot;Team&quot;) then
&#9;&#9;&#9;&#9;instance.Parent = game:GetService(&quot;Teams&quot;)
&#9;&#9;&#9;elseif instance:IsA(&quot;SpawnLocation&quot;) then
&#9;&#9;&#9;&#9;-- uh.............
&#9;&#9;&#9;elseif instance:IsA(&quot;HopperBin&quot;) then
&#9;&#9;&#9;&#9;-- Must go into the starterPack, prompt user?
&#9;&#9;&#9;elseif instance:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;&#9;-- Ask them if it should go in StarterPack?
&#9;&#9;&#9;elseif instance:IsA(&quot;Sky&quot;) then
&#9;&#9;&#9;&#9;local lightingService = game:GetService(&quot;Lighting&quot;)
&#9;&#9;&#9;&#9;for index,child in pairs(lightingService:GetChildren()) do
&#9;&#9;&#9;&#9;&#9;if child:IsA(&quot;Sky&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;child:Remove();
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;instance.Parent = lightingService
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;else
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;if #root:GetChildren() == 0 then
&#9;&#9;&#9;root:Remove()
&#9;&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;&#9;&#9;return
&#9;&#9;end
&#9;&#9;signalInsertComplete(&quot;SideDialog&quot;)
&#9;&#9;
&#9;&#9;cancelAssetPlacement()
&#9;&#9;Data.Stamp.Model = root
&#9;&#9;setupDraggableClone()
&#9;end
end
function positionPartsAtCFrame3(partOrModel, aCFrame)
&#9;local insertCFrame
&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;--insertCFrame = Data.Stamp.CurrentParts[1]:GetChildren()[1].CFrame
&#9;&#9;-- we assume model has at least one part in it; need to find first part
&#9;&#9;i = 1
&#9;&#9;while (i &lt; (#Data.Stamp.CurrentParts[1]:GetChildren()) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;Part&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;TrussPart&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;WedgePart&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;CornerWedgePart&quot;)) do
&#9;&#9;&#9;i = i + 1
&#9;&#9;end
&#9;&#9;insertCFrame = Data.Stamp.CurrentParts[1]:GetChildren()[i].CFrame
&#9;&#9;for i, object in pairs(Data.Stamp.CurrentParts[1]:GetChildren()) do
&#9;&#9;&#9;if object:IsA(&quot;Flag&quot;) then object = object.Handle end
&#9;&#9;&#9;if (object:IsA(&quot;Part&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;TrussPart&quot;) or object:IsA(&quot;Seat&quot;) or object:IsA(&quot;VehicleSeat&quot;)) then
&#9;&#9;&#9;&#9;local posPartInWorld = object.Position
&#9;&#9;&#9;&#9;local posPart1InWorld = insertCFrame.p
&#9;&#9;&#9;&#9;local newPosPartInWorld = posPartInWorld - posPart1InWorld + aCFrame.p
&#9;
&#9;&#9;&#9;&#9;local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = object.CFrame:components()
&#9;&#9;&#9;&#9;object.CFrame = CFrame.new(newPosPartInWorld.x, newPosPartInWorld.y, newPosPartInWorld.z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;else
&#9;&#9;Data.Stamp.CurrentParts[1].CFrame = aCFrame
&#9;end
end
-- For Restricting Stamper Tool (isRestricted)
function inBounds(object)
&#9;for part, transparency in pairs(object) do
&#9;&#9;if part:IsA(&quot;Part&quot;) or part:IsA(&quot;WedgePart&quot;) or part:IsA(&quot;CornerWedgePart&quot;) or part:IsA(&quot;TrussPart&quot;) then
&#9;&#9;&#9;if not partInBounds(part) then return false end
&#9;&#9;elseif part:IsA(&quot;Model&quot;) then
&#9;&#9;&#9;local primPart = object.PrimaryPart
&#9;&#9;&#9;if not partInBounds(primPart) then return false end
&#9;&#9;end
&#9;end
&#9;return true
end
function partInBounds(part)
&#9;if part == nil then return false end
&#9;local xOne= buildingPlate.Position.x + buildingPlate.Size.x/2
&#9;local xTwo = buildingPlate.Position.x - buildingPlate.Size.x/2
&#9;local zOne = buildingPlate.Position.z + buildingPlate.Size.z/2
&#9;local zTwo = buildingPlate.Position.z - buildingPlate.Size.z/2
&#9;if part.Position.x &gt; xOne or part.Position.x &lt; xTwo then return false end
&#9;if part.Position.z &gt; zOne or part.Position.z &lt; zTwo then return false end
&#9;return true
end
function canSelectObject(part)
&#9;return part and not (part.Locked) and part:IsA(&quot;BasePart&quot;) and (part.Position - Tool.Parent.Head.Position).Magnitude &lt; 60
end
function canEyeDropperObject(part)
&#9;local stamperTag = part.Parent:FindFirstChild(&quot;RobloxStamper&quot;)
&#9;if stamperTag == nil then stamperTag = part:FindFirstChild(&quot;RobloxStamper&quot;) end
&#9;return part and not (part.Locked) and part:IsA(&quot;BasePart&quot;) and (part.Position - Tool.Parent.Head.Position).Magnitude &lt; 60 and stamperTag ~= nil
end
function isOnGrid(partOrModel)
&#9;-- first check to see if off-grid, and if so, prevent eyedropperage
&#9;&#9;local modelExtentsInWorldCoords
&#9;&#9;if partOrModel:IsA(&quot;Model&quot;) then
&#9;&#9;&#9;modelExtentsInWorldCoords = partOrModel:GetModelCFrame():vectorToWorldSpace(partOrModel:GetModelSize())
&#9;&#9;else
&#9;&#9;&#9;modelExtentsInWorldCoords = partOrModel.CFrame:vectorToWorldSpace(partOrModel.Size)
&#9;&#9;end
&#9;&#9;-- we now simply check to see if the above property fits in a 4x4x4 gridspace
&#9;&#9;offX = math.fmod(math.abs(modelExtentsInWorldCoords.X), 4)
&#9;&#9;offY = math.fmod(math.abs(modelExtentsInWorldCoords.Y), 4)
&#9;&#9;offZ = math.fmod(math.abs(modelExtentsInWorldCoords.Z), 4)
&#9;&#9;local numberOfAxesOffGrid = 0
&#9;&#9;if math.min(offX, 4 - offX) &gt; eyedropperOffGridTolerance then numberOfAxesOffGrid = numberOfAxesOffGrid + 1 end
&#9;&#9;if math.min(offY, 4 - offY) &gt; eyedropperOffGridTolerance then numberOfAxesOffGrid = numberOfAxesOffGrid + 1 end
&#9;&#9;if math.min(offZ, 4 - offZ) &gt; eyedropperOffGridTolerance then numberOfAxesOffGrid = numberOfAxesOffGrid + 1 end
&#9;&#9;if numberOfAxesOffGrid &gt; 1 then return false -- we allow one axis to be not fit to grid, since any rotation must necessarily affect &gt;= 2 axes (some of the models are like 4x4x6 :( ).
&#9;&#9;else return true end
end
-- below is a helper function to help get the model surface instead of the part surface [for allowing a side to elect out of making joints automatically]
function calcRayHitTime(rayStart, raySlope, intersectionPlane)
&#9;if math.abs(raySlope) &lt; .01 then return 0 end -- 0 slope --&gt; we just say intersection time is 0, and sidestep this dimension
&#9;-- rayStart + t*raySlope = intersectionPlane, so t = (intersectionPlane - rayStart) / raySlope
&#9;return (intersectionPlane - rayStart) / raySlope
end
function modelTargetSurface(partOrModel, rayStart, rayEnd)
&#9;if not partOrModel then
&#9;&#9;return 0
&#9;end
&#9;local modelCFrame = nil
&#9;local modelSize = nil
&#9;if partOrModel:IsA(&quot;Model&quot;) then
&#9;&#9;modelCFrame = partOrModel:GetModelCFrame()
&#9;&#9;modelSize = partOrModel:GetModelSize()
&#9;else
&#9;&#9;modelCFrame = partOrModel.CFrame
&#9;&#9;modelSize = partOrModel.Size
&#9;end
&#9;local mouseRayStart = modelCFrame:pointToObjectSpace(rayStart)
&#9;local mouseRayEnd = modelCFrame:pointToObjectSpace(rayEnd)
&#9;local mouseSlope = mouseRayEnd - mouseRayStart
&#9;local xPositive = 1
&#9;local yPositive = 1
&#9;local zPositive = 1
&#9;if mouseSlope.X &gt; 0 then xPositive = -1 end
&#9;if mouseSlope.Y &gt; 0 then yPositive = -1 end
&#9;if mouseSlope.Z &gt; 0 then zPositive = -1 end
&#9;-- find which surface the transformed mouse ray hits (using modelSize):
&#9;local xHitTime = calcRayHitTime(mouseRayStart.X, mouseSlope.X, modelSize.X/2 * xPositive)
&#9;local yHitTime = calcRayHitTime(mouseRayStart.Y, mouseSlope.Y, modelSize.Y/2 * yPositive)
&#9;local zHitTime = calcRayHitTime(mouseRayStart.Z, mouseSlope.Z, modelSize.Z/2 * zPositive)
&#9;local hitFace = 0
&#9;--if xHitTime &gt;= 0 and yHitTime &gt;= 0 and zHitTime &gt;= 0 then
&#9;if xHitTime &gt; yHitTime then
&#9;&#9;if xHitTime &gt; zHitTime then
&#9;&#9;&#9;-- xFace is hit
&#9;&#9;&#9;hitFace = 1*xPositive
&#9;&#9;else
&#9;&#9;&#9;-- zFace is hit
&#9;&#9;&#9;hitFace = 3*zPositive
&#9;&#9;end
&#9;else
&#9;&#9;if yHitTime &gt; zHitTime then
&#9;&#9;&#9;-- yFace is hit
&#9;&#9;&#9;hitFace = 2*yPositive
&#9;&#9;else
&#9;&#9;&#9;-- zFace is hit
&#9;&#9;&#9;hitFace = 3*zPositive
&#9;&#9;end
&#9;end
&#9;return hitFace
end
-- helper function for truncating to 45-degree angles on a 2D plane
function truncateToCircleEighth(bigValue, littleValue)
&#9;local big = math.abs(bigValue)
&#9;local little = math.abs(littleValue)
&#9;local hypotenuse = math.sqrt(big*big + little*little)
&#9;local frac = little / hypotenuse
&#9;local bigSign = 1
&#9;local littleSign = 1
&#9;if bigValue &lt; 0 then bigSign = -1 end
&#9;if littleValue &lt; 0 then littleSign = -1 end
&#9;if frac &gt; .382683432 then
&#9;&#9;-- between 22.5 and 45 degrees, so truncate to 45-degree tilt
&#9;&#9;return .707106781 * hypotenuse * bigSign, .707106781 * hypotenuse * littleSign
&#9;else
&#9;&#9;-- between 0 and 22.5 degrees, so truncate to 0-degree tilt
&#9;&#9;return hypotenuse * bigSign, 0
&#9;end
end
function onInsertMouseMove()
&#9;if Data.Stamp.MovingLock then
&#9;&#9;return
&#9;end
&#9;-- check to see if mouse is still active, and return otherwise!
&#9;if not pcall(function () if Mouse and Mouse.Target and Mouse.Target.Parent:FindFirstChild(&quot;RobloxModel&quot;) == nil then return true else return false end end) then print(&quot;ERRORED OUT&quot;) game.JointsService:SetJoinAfterMoveTarget(nil) Mouse = nil return end
&#9;if isRestricted and Mouse then
&#9;&#9;Mouse.TargetFilter = game.Workspace.BaseplateBumpers
&#9;end
&#9;Data.Stamp.MovingLock = true
&#9;if Data.Stamp.Dragger == nil then
&#9;&#9;if Data.Stamp.Model ~= nil then
&#9;&#9;&#9;if isRestricted then
&#9;&#9;&#9;&#9;if checkPartLimit() then
&#9;&#9;&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;variables.ShowMaxedOut.Value = true
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;end
&#9;&#9;end
&#9;else
&#9;&#9;-- REM TL: Data.Stamp.Dragger:MouseMove(Mouse.UnitRay)
&#9;&#9;-- don&apos;t move with dragger - will move in one step on mouse down
&#9;&#9;-- draw ghost at acceptable positions
&#9;&#9;configFound, targetCFrame, targetSurface = findConfigAtMouseTarget(Data.Stamp.TransparencyTable)
&#9;&#9;if configFound then
&#9;&#9;&#9;&#9;if autoAlignToFace() and targetSurface ~= 1 and targetSurface ~= 4 then
&#9;&#9;&#9;&#9;-- pre-rotate the flag or portrait so it&apos;s aligned correctly
&#9;&#9;&#9;&#9;--local currCFrame
&#9;&#9;&#9;&#9;--if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then currCFrame = Data.Stamp.CurrentParts[1]:GetModelCFrame()
&#9;&#9;&#9;&#9;--else currCFrame = Data.Stamp.CurrentParts[1].CFrame end
&#9;&#9;&#9;&#9;local numRotations = 0 -- update this according to how many rotations you need to get it to target surface
&#9;&#9;&#9;&#9;if targetSurface == 3 then numRotations = 0 - gInitial90DegreeRotations + autoAlignToFace()
&#9;&#9;&#9;&#9;elseif targetSurface == 0 then numRotations = 2 - gInitial90DegreeRotations + autoAlignToFace()
&#9;&#9;&#9;&#9;elseif targetSurface == 5 then numRotations = 3 - gInitial90DegreeRotations + autoAlignToFace()
&#9;&#9;&#9;&#9;elseif targetSurface == 2 then numRotations = 1 - gInitial90DegreeRotations + autoAlignToFace() end
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;local ry = math.pi/2
&#9;&#9;&#9;&#9;local rotCF = CFrame.fromEulerAnglesXYZ(0, ry*numRotations, 0)
&#9;&#9;&#9;&#9;gInitial90DegreeRotations = gInitial90DegreeRotations + numRotations
&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;&#9;&#9;for i, object in pairs(Data.Stamp.CurrentParts[1]:GetChildren()) do
&#9;&#9;&#9;&#9;&#9;&#9;if object:IsA(&quot;Flag&quot;) then object = object.Handle end
&#9;&#9;&#9;&#9;&#9;&#9;if object:IsA(&quot;Part&quot;) or object:IsA(&quot;TrussPart&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;Seat&quot;) or object:IsA(&quot;VehicleSeat&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;object.CFrame = rotCF * object.CFrame
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1].CFrame = rotCF * Data.Stamp.CurrentParts[1].CFrame
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;&#9;-- CODE TO CHECK FOR DRAGGING GHOST PART INTO A COLLIDING STATE
&#9;&#9;&#9;local minBB, maxBB = getBoundingBoxInWorldCoordinates(Data.Stamp.CurrentParts[1])
&#9;
&#9;&#9;&#9;-- need to offset by distance to be dragged
&#9;&#9;&#9;local currModelCFrame
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) then
&#9;&#9;&#9;&#9;-- we assume model has at least one part in it; need to find first part
&#9;&#9;&#9;&#9;i = 1
&#9;&#9;&#9;&#9;while i &lt; (#Data.Stamp.CurrentParts[1]:GetChildren()) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;BasePart&quot;) do
&#9;&#9;&#9;&#9;&#9;i = i + 1
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;currModelCFrame = Data.Stamp.CurrentParts[1]:GetChildren()[i].CFrame
&#9;&#9;&#9;else currModelCFrame = Data.Stamp.CurrentParts[1].CFrame end
&#9;&#9;&#9;minBB = minBB + targetCFrame.p - currModelCFrame.p
&#9;&#9;&#9;maxBB = maxBB + targetCFrame.p - currModelCFrame.p
&#9;&#9;&#9;-- don&apos;t drag into terrain
&#9;&#9;&#9;if clusterPartsInRegion(minBB+insertBoundingBoxOverlapVector, maxBB-insertBoundingBoxOverlapVector) then
&#9;&#9;&#9;&#9;if lastTargetCFrame then
&#9;&#9;&#9;&#9;&#9;positionPartsAtCFrame3(thingToDrag, lastTargetCFrame)
&#9;&#9;&#9;&#9;&#9;if (Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot;) and (Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;ClusterMaterial&quot;)) and (Data.Stamp.CurrentParts[1].ClusterMaterial:IsA(&quot;Vector3Value&quot;)) then
&#9;&#9;&#9;&#9;&#9;&#9;local clusterMat = Data.Stamp.CurrentParts[1].ClusterMaterial
&#9;&#9;&#9;&#9;&#9;&#9;clusterMat.Value = Vector3.new(clusterMat.Value.X, clusterMat.Value.Y, lastTargetTerrainOrientation)
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;Data.Stamp.MovingLock = false
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;end
&#9;&#9;&#9;
&#9;&#9;&#9;local blockingParts = game.Workspace:FindPartsInRegion3(Region3.new(minBB+insertBoundingBoxOverlapVector, maxBB-insertBoundingBoxOverlapVector), currentSelection, 100)
&#9;&#9;&#9;for b = 1, #blockingParts do
&#9;&#9;&#9;&#9;-- put code back here if we want to prevent stamper from dragging ghost parts into other stamped models (once Region3 fix goes out)
&#9;&#9;&#9;end
&#9;&#9;&#9;positionPartsAtCFrame3(Data.Stamp.CurrentParts[1], targetCFrame)
&#9;&#9;&#9;lastTargetCFrame = targetCFrame -- successful positioning, so update &apos;dat cframe
&#9;&#9;&#9;if (Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot;) and (Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;ClusterMaterial&quot;)) and (Data.Stamp.CurrentParts[1].ClusterMaterial:IsA(&quot;Vector3Value&quot;)) then lastTargetTerrainOrientation = Data.Stamp.CurrentParts[1].ClusterMaterial.Value.Z end
&#9;&#9;&#9;-- auto break joints code
&#9;&#9;&#9;if Mouse and Mouse.Target and Mouse.Target.Parent then
&#9;&#9;&#9;&#9;local modelInfo = Mouse.Target:FindFirstChild(&quot;RobloxModel&quot;)
&#9;&#9;&#9;&#9;if not modelInfo then modelInfo = Mouse.Target.Parent:FindFirstChild(&quot;RobloxModel&quot;) end
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;local myModelInfo = Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;UnstampableFaces&quot;)
&#9;&#9;&#9;&#9;--if (modelInfo and modelInfo.Parent:FindFirstChild(&quot;UnstampableFaces&quot;)) or (modelInfo and myModelInfo) then -- need better targetSurface calcs
&#9;&#9;&#9;&#9;if (true) then
&#9;&#9;&#9;&#9;&#9;local breakingFaces = &quot;&quot;
&#9;&#9;&#9;&#9;&#9;local myBreakingFaces = &quot;&quot;
&#9;&#9;&#9;&#9;&#9;if modelInfo and modelInfo.Parent:FindFirstChild(&quot;UnstampableFaces&quot;) then breakingFaces = modelInfo.Parent.UnstampableFaces.Value end
&#9;&#9;&#9;&#9;&#9;if myModelInfo then myBreakingFaces = myModelInfo.Value end
&#9;&#9;&#9;&#9;&#9;local hitFace = 0
&#9;&#9;&#9;&#9;&#9;if modelInfo then hitFace = modelTargetSurface(modelInfo.Parent, game.Workspace.CurrentCamera.CoordinateFrame.p, Mouse.Hit.p) end
&#9;&#9;&#9;&#9;&#9;-- are we stamping TO an unstampable surface?
&#9;&#9;&#9;&#9;&#9;for bf in string.gmatch(breakingFaces, &quot;[^,]+&quot;) do
&#9;&#9;&#9;&#9;&#9;&#9;if hitFace == tonumber(bf) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- return before we hit the JointsService code below!
&#9;&#9;&#9;&#9;&#9;&#9;&#9;unstampableSurface = true
&#9;&#9;&#9;&#9;&#9;&#9;&#9;game.JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
&#9;&#9;&#9;&#9;&#9;&#9;&#9;Data.Stamp.MovingLock = false
&#9;&#9;&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;-- now we have to cast the ray back in the other direction to find the surface we&apos;re stamping FROM
&#9;&#9;&#9;&#9;&#9;hitFace = modelTargetSurface(Data.Stamp.CurrentParts[1], Mouse.Hit.p, game.Workspace.CurrentCamera.CoordinateFrame.p)
&#9;&#9;&#9;&#9;&#9;-- are we stamping WITH an unstampable surface?
&#9;&#9;&#9;&#9;&#9;for bf in string.gmatch(myBreakingFaces, &quot;[^,]+&quot;) do
&#9;&#9;&#9;&#9;&#9;&#9;if hitFace == tonumber(bf) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;unstampableSurface = true
&#9;&#9;&#9;&#9;&#9;&#9;&#9;game.JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
&#9;&#9;&#9;&#9;&#9;&#9;&#9;Data.Stamp.MovingLock = false
&#9;&#9;&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;-- just need to match breakingFace against targetSurface using rotation supplied by modelCFrame
&#9;&#9;&#9;&#9;&#9;-- targetSurface: 1 is top, 4 is bottom,
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;-- to show joints during the mouse move
&#9;&#9;unstampableSurface = false
game.JointsService:SetJoinAfterMoveInstance(Data.Stamp.CurrentParts[1])
&#9;&#9;-- most common mouse inactive error occurs here, so check mouse active one more time in a pcall
&#9;&#9;if not pcall(function () if Mouse and Mouse.Target and Mouse.Target.Parent:FindFirstChild(&quot;RobloxModel&quot;) == nil then return true else return false end end) then print(&quot;ERRORED OUT&quot;) game.JointsService:ClearJoinAfterMoveJoints() Mouse = nil Data.Stamp.MovingLock = false return end
if Mouse and Mouse.Target and Mouse.Target.Parent:FindFirstChild(&quot;RobloxModel&quot;) == nil then
&#9;&#9;&#9;game.JointsService:SetJoinAfterMoveTarget(Mouse.Target)
else
&#9;&#9;&#9;game.JointsService:SetJoinAfterMoveTarget(nil)
end
game.JointsService:ShowPermissibleJoints()
&#9;&#9;-- here we allow for a line of high-scalability parts
&#9;&#9;if (Data.Stamp.CurrentParts[1] and Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot;) and HighScalabilityLine.Start then
&#9;&#9;&#9;HighScalabilityLine.End = Data.Stamp.CurrentParts[1].CFrame.p
&#9;&#9;&#9;local line
&#9;&#9;&#9;local line2 = Vector3.new(0, 0, 0)
&#9;&#9;&#9;local line3 = Vector3.new(0, 0, 0)
&#9;&#9;&#9;if HighScalabilityLine.Dimensions == 1 then
&#9;&#9;&#9;&#9;-- extract the line from these positions and limit to a 2D plane made from 2 of the world axes
&#9;&#9;&#9;&#9;-- then use dominating axis to limit line to be at 45-degree intervals
&#9;&#9;&#9;&#9;-- will use this internal representation of the line for the actual stamping
&#9;&#9;&#9;&#9;line = (HighScalabilityLine.End - HighScalabilityLine.Start)
&#9;&#9;&#9;&#9;if math.abs(line.X) &lt; math.abs(line.Y) then
&#9;&#9;&#9;&#9;&#9;if math.abs(line.X) &lt; math.abs(line.Z) then
&#9;&#9;&#9;&#9;&#9;&#9;-- limit to Y/Z plane, domination unknown
&#9;&#9;&#9;&#9;&#9;&#9;local newY, newZ
&#9;&#9;&#9;&#9;&#9;&#9;if (math.abs(line.Y) &gt; math.abs(line.Z)) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;newY, newZ = truncateToCircleEighth(line.Y, line.Z)
&#9;&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;&#9;newZ, newY = truncateToCircleEighth(line.Z, line.Y)
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;line = Vector3.new(0, newY, newZ)
&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;-- limit to X/Y plane, with Y dominating
&#9;&#9;&#9;&#9;&#9;&#9;local newY, newX = truncateToCircleEighth(line.Y, line.X)
&#9;&#9;&#9;&#9;&#9;&#9;line = Vector3.new(newX, newY, 0)
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;if math.abs(line.Y) &lt; math.abs(line.Z) then
&#9;&#9;&#9;&#9;&#9;&#9;-- limit to X/Z plane, domination unknown
&#9;&#9;&#9;&#9;&#9;&#9;local newX, newZ
&#9;&#9;&#9;&#9;&#9;&#9;if math.abs(line.X) &gt; math.abs(line.Z) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;newX, newZ = truncateToCircleEighth(line.X, line.Z)
&#9;&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;&#9;newZ, newX = truncateToCircleEighth(line.Z, line.X)
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;line = Vector3.new(newX, 0, newZ)
&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;-- limit to X/Y plane, with X dominating
&#9;&#9;&#9;&#9;&#9;&#9;local newX, newY = truncateToCircleEighth(line.X, line.Y)
&#9;&#9;&#9;&#9;&#9;&#9;line = Vector3.new(newX, newY, 0)
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;HighScalabilityLine.InternalLine = line
&#9;&#9;&#9;elseif HighScalabilityLine.Dimensions == 2 then
&#9;&#9;&#9;&#9;line = HighScalabilityLine.MoreLines[1]
&#9;&#9;&#9;&#9;line2 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[1]
&#9;&#9;
&#9;&#9;&#9;&#9;-- take out any component of line2 along line1, so you get perpendicular to line1 component
&#9;&#9;&#9;&#9;line2 = line2 - line.unit*line.unit:Dot(line2)
&#9;&#9;&#9;&#9;tempCFrame = CFrame.new(HighScalabilityLine.Start, HighScalabilityLine.Start + line)
&#9;&#9;&#9;&#9;-- then zero out whichever is the smaller component
&#9;&#9;&#9;&#9;local yAxis = tempCFrame:vectorToWorldSpace(Vector3.new(0, 1, 0))
&#9;&#9;&#9;&#9;local xAxis = tempCFrame:vectorToWorldSpace(Vector3.new(1, 0, 0))
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;local xComp = xAxis:Dot(line2)
&#9;&#9;&#9;&#9;local yComp = yAxis:Dot(line2)
&#9;&#9;&#9;&#9;if math.abs(yComp) &gt; math.abs(xComp) then
&#9;&#9;&#9;&#9;&#9;line2 = line2 - xAxis*xComp
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;line2 = line2 - yAxis*yComp
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;HighScalabilityLine.InternalLine = line2
&#9;&#9;&#9;elseif HighScalabilityLine.Dimensions == 3 then
&#9;&#9;&#9;&#9;line = HighScalabilityLine.MoreLines[1]
&#9;&#9;&#9;&#9;line2 = HighScalabilityLine.MoreLines[2]
&#9;&#9;&#9;&#9;line3 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[2]
&#9;&#9;&#9;&#9;-- zero out all components of previous lines
&#9;&#9;&#9;&#9;line3 = line3 - line.unit*line.unit:Dot(line3)
&#9;&#9;&#9;&#9;line3 = line3 - line2.unit*line2.unit:Dot(line3)
&#9;&#9;&#9;&#9;HighScalabilityLine.InternalLine = line3
&#9;&#9;&#9;end
&#9;&#9;&#9;-- resize the &quot;line&quot; graphic to be the correct size and orientation
&#9;&#9;&#9;tempCFrame = CFrame.new(HighScalabilityLine.Start, HighScalabilityLine.Start + line)
&#9;&#9;&#9;
&#9;&#9;&#9;if HighScalabilityLine.Dimensions == 1 then -- faster calculation for line
&#9;&#9;&#9;&#9;HighScalabilityLine.AdornPart.Size = Vector3.new(4, 4, line.magnitude + 4)
&#9;&#9;&#9;&#9;HighScalabilityLine.AdornPart.CFrame = tempCFrame + tempCFrame:vectorToWorldSpace(Vector3.new(2, 2, 2) - HighScalabilityLine.AdornPart.Size/2)
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;local boxSize = tempCFrame:vectorToObjectSpace(line + line2 + line3)
&#9;&#9;&#9;&#9;HighScalabilityLine.AdornPart.Size = Vector3.new(4, 4, 4) + Vector3.new(math.abs(boxSize.X), math.abs(boxSize.Y), math.abs(boxSize.Z))
&#9;&#9;&#9;&#9;HighScalabilityLine.AdornPart.CFrame = tempCFrame + tempCFrame:vectorToWorldSpace(boxSize/2)
&#9;&#9;&#9;end
&#9;&#9;&#9;-- make player able to see this ish
&#9;&#9;&#9;if player then HighScalabilityLine.Adorn.Parent = player.PlayerGui end
&#9;&#9;&#9;if HighScalabilityLine.NewHint then
&#9;&#9;&#9;&#9;if HighScalabilityLine.Dimensions == 1 and line and (line.magnitude &gt; 4) then hint(&quot;Press C to stamp in 2D&quot;) HighScalabilityLine.NewHint = false
&#9;&#9;&#9;&#9;elseif HighScalabilityLine.Dimensions == 2 and line2 and (line2.magnitude &gt; 4) then hint(&quot;Press C again to stamp in 3D&quot;) HighScalabilityLine.NewHint = false
&#9;&#9;&#9;&#9;elseif HighScalabilityLine.Dimensions == 3 then HighScalabilityLine.NewHint = false end -- if we do cyclic, then let them know they&apos;re going back to line stamping
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;Data.Stamp.MovingLock = false
end
function onInsertMouseButton1Down()
&#9;if Data.Stamp.Dragger or Data.Stamp.Decal then
&#9;&#9;Data.Stamp.MouseDown = true
&#9;end
&#9;if (Data.Stamp.CurrentParts and Data.Stamp.CurrentParts[1] and Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot;) and not eyeDropperConnection then
&#9;&#9;&#9;-- only let them drag if they start dragging on the cluster!
&#9;&#9;&#9;if Mouse and Mouse.Target and Mouse.Target:IsA(&quot;Terrain&quot;) then
&#9;&#9;&#9;&#9;HighScalabilityLine.Dimensions = 1
&#9;&#9;&#9;&#9;HighScalabilityLine.Start = Data.Stamp.CurrentParts[1].CFrame.p
&#9;&#9;&#9;end
&#9;end
end
function cancelAssetPlacement()
&#9;HighScalabilityLine.Start = nil
&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;gInitial90DegreeRotations = 0
&#9;Data.Stamp.Cancelled = true
&#9;if Data.Stamp[&quot;Model&quot;] then
&#9;&#9;Data.Stamp.Model.Parent = nil
&#9;end
&#9;if Data.Stamp.CurrentParts then
&#9;&#9;for index, object in pairs(Data.Stamp.CurrentParts) do
&#9;&#9;&#9;object.Parent = nil
&#9;&#9;end
&#9;
&#9;&#9;Data.Stamp.CurrentParts.Parent = nil
&#9;end
&#9;if Data.Stamp.DecalSelection then
&#9;&#9;Data.Stamp.DecalSelection:Remove()
&#9;&#9;Data.Stamp.DecalSelection = nil
&#9;end
&#9;if Data.Stamp.Decal then
&#9;&#9;Data.Stamp.Decal:Remove()
&#9;&#9;Data.Stamp.Decal = nil
&#9;end
&#9;if Mouse then
&#9;&#9;Mouse.Icon = &quot;http://www.roblox.com/asset?id=66887745&quot;
&#9;end
&#9;game.JointsService:ClearJoinAfterMoveJoints()
end
function collectParts(object, baseParts, scripts, decals)
&#9;if object:IsA(&quot;BasePart&quot;) then
&#9;&#9;baseParts[#baseParts+1] = object
&#9;elseif object:IsA(&quot;Script&quot;) then
&#9;&#9;scripts[#scripts+1] = object
&#9;elseif object:IsA(&quot;Decal&quot;) then
&#9;&#9;decals[#decals+1] = object
&#9;end
&#9;for index,child in pairs(object:GetChildren()) do
&#9;&#9;collectParts(child, baseParts, scripts, decals)
&#9;end
end
function getTargetPartBoundingBox(targetPart)
&#9;if targetPart.Parent:FindFirstChild(&quot;RobloxModel&quot;) ~= nil then
&#9;&#9;return getBoundingBox2(targetPart.Parent)
&#9;else
&#9;&#9;return getBoundingBox2(targetPart)
&#9;end
end
function getBoundingBox2(partOrModel)
-- for models, the bounding box is defined as the minimum and maximum individual part bounding boxes
-- relative to the first part&apos;s coordinate frame.
&#9;local minVec = Vector3.new(math.huge, math.huge, math.huge)
&#9;local maxVec = Vector3.new(-math.huge, -math.huge, -math.huge)
&#9;if partOrModel:IsA(&quot;Part&quot;) or partOrModel:IsA(&quot;WedgePart&quot;) or partOrModel:IsA(&quot;CornerWedgePart&quot;) or partOrModel:IsA(&quot;TrussPart&quot;)then
&#9;&#9;minVec = -0.5 * partOrModel.Size
&#9;&#9;maxVec = -minVec
&#9;elseif partOrModel:IsA(&quot;Terrain&quot;) then
&#9;&#9;minVec = Vector3.new(-2, -2, -2)
&#9;&#9;maxVec = Vector3.new(2, 2, 2)
&#9;else
&#9;&#9;local part1 = partOrModel:GetChildren()[1]
&#9;&#9;if partOrModel:IsA(&quot;Tool&quot;) then part1 = partOrModel.Handle if not part1 then return end end
&#9;&#9;if part1:IsA(&quot;Flag&quot;) then part1 = partOrModel:FindFirstChild(&quot;Part&quot;) if not part1 then return end end
&#9;&#9;for i, object in pairs(partOrModel:GetChildren()) do
&#9;&#9;&#9;if (object:IsA(&quot;Part&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;TrussPart&quot;)) then
&#9;&#9;&#9;&#9;boxMinInWorld = object.CFrame:pointToWorldSpace(-0.5 * object.Size)
&#9;&#9;&#9;&#9;boxMinInPart1 = part1.CFrame:pointToObjectSpace(boxMinInWorld)
&#9;&#9;&#9;&#9;boxMaxInWorld = object.CFrame:pointToWorldSpace(0.5 * object.Size)
&#9;&#9;&#9;&#9;boxMaxInPart1 = part1.CFrame:pointToObjectSpace(boxMaxInWorld)
&#9;&#9;&#9;&#9;local minX = minVec.x
&#9;&#9;&#9;&#9;local minY = minVec.y
&#9;&#9;&#9;&#9;local minZ = minVec.z
&#9;&#9;&#9;&#9;local maxX = maxVec.x
&#9;&#9;&#9;&#9;local maxY = maxVec.y
&#9;&#9;&#9;&#9;local maxZ = maxVec.z
&#9;&#9;&#9;&#9;if boxMinInPart1.x &lt; minVec.x then
&#9;&#9;&#9;&#9;&#9;minX = boxMinInPart1.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInPart1.y &lt; minVec.y then
&#9;&#9;&#9;&#9;&#9;minY = boxMinInPart1.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInPart1.z &lt; minVec.z then
&#9;&#9;&#9;&#9;&#9;minZ = boxMinInPart1.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.x &lt; minX then
&#9;&#9;&#9;&#9;&#9;minX = boxMaxInPart1.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.y &lt; minY then
&#9;&#9;&#9;&#9;&#9;minY = boxMaxInPart1.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.z &lt; minZ then
&#9;&#9;&#9;&#9;&#9;minZ = boxMaxInPart1.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInPart1.x &gt; maxVec.x then
&#9;&#9;&#9;&#9;&#9;maxX = boxMinInPart1.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInPart1.y &gt; maxVec.y then
&#9;&#9;&#9;&#9;&#9;maxY = boxMinInPart1.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInPart1.z &gt; maxVec.z then
&#9;&#9;&#9;&#9;&#9;maxZ = boxMinInPart1.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.x &gt; maxX then
&#9;&#9;&#9;&#9;&#9;maxX = boxMaxInPart1.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.y &gt; maxY then
&#9;&#9;&#9;&#9;&#9;maxY = boxMaxInPart1.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInPart1.z &gt; maxZ then
&#9;&#9;&#9;&#9;&#9;maxZ = boxMaxInPart1.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;minVec = Vector3.new(minX, minY, minZ)
&#9;&#9;&#9;&#9;maxVec = Vector3.new(maxX, maxY, maxZ)
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;-- Adjust bounding box to reflect what the model or part author wants in terms of justification
&#9;local justifyValue = partOrModel:FindFirstChild(&quot;Justification&quot;)
&#9;if justifyValue ~= nil then
&#9;&#9;-- find the multiple of 4 that contains the model
&#9;&#9;justify = justifyValue.Value
&#9;&#9;two = Vector3.new(2, 2, 2)
&#9;&#9;actualBox = maxVec - minVec - Vector3.new(0.01, 0.01, 0.01)
&#9;&#9;containingGridBox = Vector3.new(4 * math.ceil(actualBox.x/4), 4 * math.ceil(actualBox.y/4), 4 * math.ceil(actualBox.z/4))
&#9;&#9;adjustment = containingGridBox - actualBox
&#9;&#9;minVec = minVec - 0.5 * adjustment * justify
&#9;&#9;maxVec = maxVec + 0.5 * adjustment * (two - justify)
&#9;end
&#9;return minVec, maxVec
end
function getBoundingBoxInWorldCoordinates(partOrModel)
&#9;local minVec = Vector3.new(math.huge, math.huge, math.huge)
&#9;local maxVec = Vector3.new(-math.huge, -math.huge, -math.huge)
&#9;if partOrModel:IsA(&quot;BasePart&quot;)then
&#9;&#9;vec1 = partOrModel.CFrame:pointToWorldSpace(-0.5 * partOrModel.Size)
&#9;&#9;vec2 = partOrModel.CFrame:pointToWorldSpace(0.5 * partOrModel.Size)
&#9;&#9;minVec = Vector3.new(math.min(vec1.X, vec2.X), math.min(vec1.Y, vec2.Y), math.min(vec1.Z, vec2.Z))
&#9;&#9;maxVec = Vector3.new(math.max(vec1.X, vec2.X), math.max(vec1.Y, vec2.Y), math.max(vec1.Z, vec2.Z))
&#9;elseif partOrModel:IsA(&quot;Terrain&quot;) then
&#9;&#9;-- we shouldn&apos;t have to deal with this case
&#9;&#9;--minVec = Vector3.new(-2, -2, -2)
&#9;&#9;--maxVec = Vector3.new(2, 2, 2)
&#9;else
&#9;&#9;local part1 = partOrModel:GetChildren()[1]
&#9;&#9;for i, object in pairs(partOrModel:GetChildren()) do
&#9;&#9;&#9;if object:IsA(&quot;BasePart&quot;) then
&#9;&#9;&#9;&#9;boxMinInWorld = object.CFrame:pointToWorldSpace(-0.5 * object.Size)
&#9;&#9;&#9;&#9;boxMaxInWorld = object.CFrame:pointToWorldSpace(0.5 * object.Size)
&#9;&#9;&#9;&#9;local minX = minVec.x
&#9;&#9;&#9;&#9;local minY = minVec.y
&#9;&#9;&#9;&#9;local minZ = minVec.z
&#9;&#9;&#9;&#9;local maxX = maxVec.x
&#9;&#9;&#9;&#9;local maxY = maxVec.y
&#9;&#9;&#9;&#9;local maxZ = maxVec.z
&#9;&#9;&#9;&#9;if boxMinInWorld.x &lt; minX then
&#9;&#9;&#9;&#9;&#9;minX = boxMinInWorld.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInWorld.y &lt; minY then
&#9;&#9;&#9;&#9;&#9;minY = boxMinInWorld.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInWorld.z &lt; minZ then
&#9;&#9;&#9;&#9;&#9;minZ = boxMinInWorld.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.x &lt; minX then
&#9;&#9;&#9;&#9;&#9;minX = boxMaxInWorld.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.y &lt; minY then
&#9;&#9;&#9;&#9;&#9;minY = boxMaxInWorld.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.z &lt; minZ then
&#9;&#9;&#9;&#9;&#9;minZ = boxMaxInWorld.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInWorld.x &gt; maxX then
&#9;&#9;&#9;&#9;&#9;maxX = boxMinInWorld.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInWorld.y &gt; maxY then
&#9;&#9;&#9;&#9;&#9;maxY = boxMinInWorld.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMinInWorld.z &gt; maxZ then
&#9;&#9;&#9;&#9;&#9;maxZ = boxMinInWorld.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.x &gt; maxX then
&#9;&#9;&#9;&#9;&#9;maxX = boxMaxInWorld.x
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.y &gt; maxY then
&#9;&#9;&#9;&#9;&#9;maxY = boxMaxInWorld.y
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if boxMaxInWorld.z &gt; maxZ then
&#9;&#9;&#9;&#9;&#9;maxZ = boxMaxInWorld.z
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;minVec = Vector3.new(minX, minY, minZ)
&#9;&#9;&#9;&#9;maxVec = Vector3.new(maxX, maxY, maxZ)
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;return minVec, maxVec
end
function getClosestAlignedWorldDirection(aVector3InWorld)
&#9;local xDir = Vector3.new(1,0,0)
&#9;local yDir = Vector3.new(0,1,0)
&#9;local zDir = Vector3.new(0,0,1)
&#9;local xDot = aVector3InWorld.x * xDir.x + aVector3InWorld.y * xDir.y + aVector3InWorld.z * xDir.z
&#9;local yDot = aVector3InWorld.x * yDir.x + aVector3InWorld.y * yDir.y + aVector3InWorld.z * yDir.z
&#9;local zDot = aVector3InWorld.x * zDir.x + aVector3InWorld.y * zDir.y + aVector3InWorld.z * zDir.z
&#9;if math.abs(xDot) &gt; math.abs(yDot) and math.abs(xDot) &gt; math.abs(zDot) then
&#9;&#9;if xDot &gt; 0 then
&#9;&#9;&#9;return 0
&#9;&#9;else
&#9;&#9;&#9;return 3
&#9;&#9;end
&#9;elseif math.abs(yDot) &gt; math.abs(xDot) and math.abs(yDot) &gt; math.abs(zDot) then
&#9;&#9;if yDot &gt; 0 then
&#9;&#9;&#9;return 1
&#9;&#9;else
&#9;&#9;&#9;return 4
&#9;&#9;end
&#9;else
&#9;&#9;if zDot &gt; 0 then
&#9;&#9;&#9;return 2
&#9;&#9;else
&#9;&#9;&#9;return 5
&#9;&#9;end
&#9;end
end
function getMouseTargetCFrame(targetPart)
&#9;if targetPart.Parent:FindFirstChild(&quot;RobloxModel&quot;) ~= nil then
&#9;&#9;if targetPart.Parent:IsA(&quot;Tool&quot;) then return targetPart.Parent.Handle.CFrame
&#9;&#9;else return targetPart.Parent:GetChildren()[1].CFrame end
&#9;else
&#9;&#9;return targetPart.CFrame
&#9;end
end
function surfaceToVector(surf)
&#9;local vect = 1
&#9;if surf &lt; 0 then
&#9;&#9;surf = surf * -1
&#9;&#9;vect = vect * -1
&#9;end
&#9;if surf == 1 then return vect*Vector3.new(1, 0, 0)
&#9;elseif surf == 2 then return vect*Vector3.new(0, 1, 0)
&#9;elseif surf == 3 then return vect*Vector3.new(0, 0, 1)
&#9;elseif Mouse then return Vector3.FromNormalId(Mouse.TargetSurface) end -- if we somehow got a &quot;0&quot;, then we just revert to old behavior
&#9;return Vector3.new(0,0,0)
end
function findConfigAtMouseTarget(partsTable)
-- *Critical Assumption* :
--&#9;&#9;&#9;&#9;This function assumes the target CF axes are orthogonal with the target bounding box faces
--&#9;&#9;&#9;&#9;And, it assumes the insert CF axes are orthongonal with the insert bounding box faces
--&#9;&#9;&#9;&#9;Therefore, insertion will not work with angled faces on wedges or other &quot;non-block&quot; parts, nor
--&#9;&#9;&#9;&#9;will it work for parts in a model that are not orthogonally aligned with the model&apos;s CF.
&#9;local grid = 4.0
&#9;local admissibleConfig = false
&#9;local targetConfig = CFrame.new(0,0,0)
&#9;local minBB, maxBB = getBoundingBox2(Data.Stamp.CurrentParts[1])
&#9;local diagBB = maxBB - minBB
&#9;local insertCFrame
&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;i = 1
&#9;&#9;while (i &lt; (#Data.Stamp.CurrentParts[1]:GetChildren()) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;Part&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;TrussPart&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;WedgePart&quot;) and not Data.Stamp.CurrentParts[1]:GetChildren()[i]:IsA(&quot;CornerWedgePart&quot;)) do
&#9;&#9;&#9;i = i + 1
&#9;&#9;end
&#9;&#9;insertCFrame = Data.Stamp.CurrentParts[1]:GetChildren()[i].CFrame
&#9;else
&#9;&#9;insertCFrame = Data.Stamp.CurrentParts[1].CFrame
&#9;end
&#9;if not isRestricted and Mouse then
&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then Mouse.TargetFilter = Data.Stamp.CurrentParts[1].Handle
&#9;&#9;else Mouse.TargetFilter = Data.Stamp.CurrentParts[1] end
&#9;end
&#9;local targetPart = nil
&#9;local success = pcall(function() targetPart = Mouse.Target end)
&#9;if not success or targetPart == nil then
&#9;&#9;return admissibleConfig, targetConfig
&#9;end
&#9;-- test mouse hit location
&#9;local minBBTarget, maxBBTarget = getTargetPartBoundingBox(targetPart)
&#9;local diagBBTarget = maxBBTarget - minBBTarget
&#9;local targetCFrame = getMouseTargetCFrame(targetPart)
&#9;local hitCFrame = CFrame.new(0,0,0)
&#9;if Mouse then
&#9;&#9;hitCFrame = Mouse.Hit
&#9;end
&#9;local mouseHitInWorld = hitCFrame.p
&#9;-- find which axis of the insertion objects should match with the target surface
&#9;-- this should use targetPart CFrame, not the model CFrame
&#9;--[[ attempt at fixing Mouse.TargetSurface below...
&#9;local targetModel = targetPart
&#9;if not targetPart:FindFirstChild(&quot;RobloxModel&quot;) and targetPart.Parent and targetPart.Parent:FindFirstChild(&quot;RobloxModel&quot;) then targetModel = targetPart.Parent end
&#9;local correctedTargetSurfaceVector = surfaceToVector(modelTargetSurface(targetModel, game.Workspace.CurrentCamera.CoordinateFrame.p, mouseHitInWorld))
&#9;local targetVectorInWorld = targetPart.CFrame:vectorToWorldSpace(correctedTargetSurfaceVector)
&#9;--]]
&#9;if targetPart:IsA(&quot;Terrain&quot;) then
&#9;&#9;if not cluster then cluster = game.Workspace.Terrain end
&#9;&#9;cellID = cluster:WorldToCellPreferSolid(mouseHitInWorld)
&#9;&#9;targetCFrame = CFrame.new(cluster:CellCenterToWorld(cellID.x, cellID.y, cellID.z))
&#9;end
&#9;
&#9;local mouseHitInTarget = targetCFrame:pointToObjectSpace(mouseHitInWorld)
&#9;local targetVectorInWorld = Vector3.new(0,0,0)
&#9;if Mouse then
&#9;&#9;targetVectorInWorld = targetCFrame:vectorToWorldSpace(Vector3.FromNormalId(Mouse.TargetSurface))
&#9;end
&#9;local targetRefPointInTarget
&#9;local clampToSurface
&#9;if getClosestAlignedWorldDirection(targetVectorInWorld) == 0 then
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(1, -1, 1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(-1, -1, 1))
&#9;&#9;clampToSurface = Vector3.new(0,1,1)
&#9;elseif getClosestAlignedWorldDirection(targetVectorInWorld) == 3 then
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(-1, -1, -1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(1, -1, -1))
&#9;&#9;clampToSurface = Vector3.new(0,1,1)
&#9;elseif getClosestAlignedWorldDirection(targetVectorInWorld) == 1 then
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(-1, 1, 1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(-1, -1, 1))
&#9;&#9;clampToSurface = Vector3.new(1,0,1)&#9;&#9;
&#9;elseif getClosestAlignedWorldDirection(targetVectorInWorld) == 4 then
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(-1, -1, 1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(-1, 1, 1))
&#9;&#9;clampToSurface = Vector3.new(1,0,1)
&#9;elseif getClosestAlignedWorldDirection(targetVectorInWorld) == 2 then
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(-1, -1, 1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(-1, -1, -1))
&#9;&#9;clampToSurface = Vector3.new(1,1,0)
&#9;else
&#9;&#9;targetRefPointInTarget = targetCFrame:vectorToObjectSpace(Vector3.new(1, -1, -1))
&#9;&#9;insertRefPointInInsert = insertCFrame:vectorToObjectSpace(Vector3.new(1, -1, 1))
&#9;&#9;clampToSurface = Vector3.new(1,1,0)
&#9;end
&#9;targetRefPointInTarget = targetRefPointInTarget * (0.5 * diagBBTarget) + 0.5 * (maxBBTarget + minBBTarget)
&#9;insertRefPointInInsert = insertRefPointInInsert * (0.5 * diagBB) + 0.5 * (maxBB + minBB)
&#9;
&#9;-- To Do: For cases that are not aligned to the world grid, account for the minimal rotation
&#9;-- needed to bring the Insert part(s) into alignment with the Target Part
&#9;-- Apply the rotation here
&#9;local delta = mouseHitInTarget - targetRefPointInTarget
&#9;local deltaClamped = Vector3.new(grid * math.modf(delta.x/grid), grid * math.modf(delta.y/grid), grid * math.modf(delta.z/grid))
&#9;deltaClamped = deltaClamped * clampToSurface
&#9;local targetTouchInTarget = deltaClamped + targetRefPointInTarget
&#9;local TargetTouchRelToWorld = targetCFrame:pointToWorldSpace(targetTouchInTarget)
&#9;local InsertTouchInWorld = insertCFrame:vectorToWorldSpace(insertRefPointInInsert)
&#9;local posInsertOriginInWorld = TargetTouchRelToWorld - InsertTouchInWorld
&#9;local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = insertCFrame:components()
&#9;targetConfig = CFrame.new(posInsertOriginInWorld.x, posInsertOriginInWorld.y, posInsertOriginInWorld.z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
&#9;admissibleConfig = true
&#9;return admissibleConfig, targetConfig, getClosestAlignedWorldDirection(targetVectorInWorld)
end
function checkPartLimit()
&#9;local numPoints = player.PointsUsed.Value
&#9;local maxPoints = player.MaxPoints.Value
&#9;if numPoints &lt; maxPoints then
&#9;&#9;return true
&#9;else
&#9;&#9;return false
&#9;end
&#9;return true
end
function setupDraggableClone()
&#9;if eyeDropperConnection then eyeDropperConnection:disconnect() eyeDropperConnection = nil end
&#9;--if not Mouse.Target then return end
&#9;click.Value = false
&#9;if Data.Stamp.CurrentParts then
&#9;&#9;for i = 1, #Data.Stamp.CurrentParts do
&#9;&#9;&#9;if Data.Stamp.CurrentParts[i].Parent ~= nil then
&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[i].Parent = partModel
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;
&#9;if Data.Stamp[&quot;Model&quot;] == nil then return end
&#9;local clone = Data.Stamp.Model:Clone()
&#9;local scripts = {}
&#9;local parts = {}
&#9;local decals = {}
&#9;
&#9;collectParts(clone, parts, scripts, decals)
&#9;if #parts &gt; 0 then
&#9;&#9;Data.Stamp.DisabledScripts = {}
&#9;&#9;Data.Stamp.TransparencyTable = {}
&#9;&#9;Data.Stamp.MaterialTable = {}
&#9;&#9;Data.Stamp.CanCollideTable = {}
&#9;&#9;Data.Stamp.AnchoredTable = {}
&#9;&#9;Data.Stamp.DecalTransparencyTable = {}
&#9;&#9;for index,script in pairs(scripts) do
&#9;&#9;&#9;if not(script.Disabled) then
&#9;&#9;&#9;&#9;script.Disabled = true
&#9;&#9;&#9;&#9;Data.Stamp.DisabledScripts[#Data.Stamp.DisabledScripts +1] = script
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;for index, part in pairs(parts) do
&#9;&#9;&#9;Data.Stamp.TransparencyTable[part] = part.Transparency
&#9;&#9;&#9;part.Transparency = gStaticTrans + (1-gStaticTrans)*part.Transparency
&#9;&#9;&#9;Data.Stamp.MaterialTable[part] = part.Material
&#9;&#9;&#9;part.Material = Enum.Material.Plastic
&#9;&#9;&#9;Data.Stamp.CanCollideTable[part] = part.CanCollide
&#9;&#9;&#9;part.CanCollide = false
&#9;&#9;&#9;Data.Stamp.AnchoredTable[part] = part.Anchored
&#9;&#9;&#9;part.Anchored = true
&#9;&#9;&#9;part.archivable = false
&#9;&#9;&#9;delay(0,function()
&#9;&#9;&#9;&#9;local con = nil
&#9;&#9;&#9;&#9;local exitLoop = false
&#9;&#9;&#9;&#9;con = click.Changed:connect(function()
&#9;&#9;&#9;&#9;&#9;if click.Value then
&#9;&#9;&#9;&#9;&#9;&#9;con:disconnect()
&#9;&#9;&#9;&#9;&#9;&#9;exitLoop = true
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end)
&#9;&#9;&#9;&#9;wait(fadeInDelayTime) -- give it some time to be completely transparent
&#9;&#9;&#9;&#9;if exitLoop then return end -- if we already stamped, we don&apos;t need to do the rest of this
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;local begTime = tick()
&#9;&#9;&#9;&#9;local currTime = begTime
&#9;&#9;&#9;&#9;while (currTime - begTime) &lt; transFadeInTime and part and part:IsA(&quot;BasePart&quot;) and part.Transparency &gt; gDesiredTrans and not exitLoop do
&#9;&#9;&#9;&#9;&#9;local newTrans = 1 - (((currTime - begTime)/transFadeInTime) * (gStaticTrans - gDesiredTrans))
&#9;&#9;&#9;&#9;&#9;if Data.Stamp.TransparencyTable[part] then part.Transparency = newTrans + (1-newTrans) * Data.Stamp.TransparencyTable[part] end
&#9;&#9;&#9;&#9;&#9;wait(0.03)
&#9;&#9;&#9;&#9;&#9;currTime = tick()
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if part and part:IsA(&quot;BasePart&quot;) and not exitLoop then
&#9;&#9;&#9;&#9;&#9;if Data.Stamp.TransparencyTable[part] then part.Transparency = gDesiredTrans + (1-gDesiredTrans)*Data.Stamp.TransparencyTable[part] end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if con then con:disconnect() end
&#9;&#9;&#9;end)
&#9;&#9;end
&#9;&#9;for index, decal in pairs(decals) do
&#9;&#9;&#9;Data.Stamp.DecalTransparencyTable[decal] = decal.Transparency
&#9;&#9;&#9;decal.Transparency = gDesiredTrans + (1-gDesiredTrans)*decal.Transparency
&#9;&#9;end
&#9;&#9;
&#9;&#9;clone.Parent = game.Workspace
&#9;&#9;-- For Restricting Stamper Tool
&#9;&#9;if(isRestricted) then
&#9;&#9;&#9;-- mark a particular spot in BaseplateBumpers, so we can remove any stragglers later, when player leaves
&#9;&#9;&#9;local cloneInsertionSpot = game.Workspace.BaseplateBumpers:FindFirstChild(player.Name)
&#9;&#9;&#9;if cloneInsertionSpot == nil then
&#9;&#9;&#9;&#9;cloneInsertionSpot = Instance.new(&quot;Model&quot;)
&#9;&#9;&#9;&#9;cloneInsertionSpot.Name = player.Name
&#9;&#9;&#9;&#9;cloneInsertionSpot.Parent = game.Workspace.BaseplateBumpers
&#9;&#9;&#9;end
&#9;&#9;&#9;clone.Parent = cloneInsertionSpot
&#9;&#9;end
&#9;&#9;-- disable all seats
&#9;&#9;setSeatEnabledStatus(clone, true)
&#9;&#9;setSeatEnabledStatus(clone, false)
&#9;&#9;Data.Stamp.CurrentParts = clone:GetChildren()
&#9;&#9;-- if auto-alignable, we enforce a pre-rotation to the canonical &quot;0-frame&quot;
&#9;&#9;if autoAlignToFace() then
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1].PrimaryPart then modelInverse = Data.Stamp.CurrentParts[1].PrimaryPart.CFrame:inverse()
&#9;&#9;&#9;else modelInverse = Data.Stamp.CurrentParts[1]:GetModelCFrame():inverse() end
&#9;&#9;&#9;for i, object in pairs(Data.Stamp.CurrentParts[1]:GetChildren()) do
&#9;&#9;&#9;&#9;if object:IsA(&quot;Flag&quot;) then object = object.Handle end
&#9;&#9;&#9;&#9;if object:IsA(&quot;Part&quot;) or object:IsA(&quot;TrussPart&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;Seat&quot;) or object:IsA(&quot;VehicleSeat&quot;) then object.CFrame = modelInverse*object.CFrame end
&#9;&#9;&#9;end
&#9;&#9;&#9;gInitial90DegreeRotations = 0
&#9;&#9;else
&#9;&#9;-- pre-rotate if necessary
&#9;&#9;local ry = gInitial90DegreeRotations * math.pi/2
&#9;&#9;local rotCF = CFrame.fromEulerAnglesXYZ(0, ry, 0)
&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;for i, object in pairs(Data.Stamp.CurrentParts[1]:GetChildren()) do
&#9;&#9;&#9;&#9;if object:IsA(&quot;Flag&quot;) then object = object.Handle end
&#9;&#9;&#9;&#9;if object:IsA(&quot;Part&quot;) or object:IsA(&quot;TrussPart&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;Seat&quot;) or object:IsA(&quot;VehicleSeat&quot;) then object.CFrame = rotCF * object.CFrame end
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;Data.Stamp.CurrentParts[1].CFrame = rotCF * Data.Stamp.CurrentParts[1].CFrame
&#9;&#9;end
&#9;&#9;end
&#9;&#9;-- After rotating, update the position
&#9;&#9;configFound, targetCFrame = findConfigAtMouseTarget(Data.Stamp.TransparencyTable)
&#9;&#9;if configFound then
&#9;&#9;&#9;positionPartsAtCFrame3(Data.Stamp.TransparencyTable, targetCFrame)
&#9;&#9;end
&#9;&#9;-- to show joints during the mouse move
game.JointsService:SetJoinAfterMoveInstance(Data.Stamp.CurrentParts[1])
&#9;&#9;local mouseTarget = nil
&#9;&#9;pcall(function() mouseTarget = Mouse.Target end)
if mouseTarget and mouseTarget.Parent:FindFirstChild(&quot;RobloxModel&quot;) == nil then
&#9;&#9;&#9;game.JointsService:SetJoinAfterMoveTarget(mouseTarget)
else
&#9;&#9;&#9;game.JointsService:SetJoinAfterMoveTarget(nil)
&#9;&#9;end
game.JointsService:ShowPermissibleJoints()
&#9;&#9;for index, object in pairs(Data.Stamp.CurrentParts) do
&#9;&#9;&#9;object.Parent = clone.Parent
&#9;&#9;end
&#9;&#9;clone:Remove()
&#9;&#9;lastTargetCFrame = nil
&#9;
&#9;&#9;if billBoardOwnerGui then
&#9;&#9;&#9;if #parts == 1 then
&#9;&#9;&#9;&#9;billBoardOwnerGui.Parent = parts[1]
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;billBoardOwnerGui.Parent = parts[1].Parent
&#9;&#9;&#9;end
&#9;&#9;end
&#9;&#9;HighScalabilityLine.NewHint = true -- show hint if they start dragging a high-scalability part
&#9;&#9;Data.Stamp.Dragger = Instance.new(&quot;Dragger&quot;)
&#9;&#9;--Begin a movement by faking a MouseDown signal
&#9;&#9;Data.Stamp.Dragger:MouseDown(parts[1], Vector3.new(0,0,0), parts)
&#9;&#9;Data.Stamp.Dragger:MouseUp()
&#9;else
&#9;&#9;--Nothing draggable in the Model
&#9;&#9;Data.Stamp.Model:Remove()
&#9;&#9;Data.Stamp.Model = nil
&#9;&#9;Data.Stamp.TransparencyTable = nil
&#9;&#9;Data.Stamp.MaterialTable = nil
&#9;&#9;Data.Stamp.CanCollideTable = nil
&#9;&#9;Data.Stamp.AnchoredTable = nil
&#9;&#9;Data.Stamp.DisabledScripts = nil
&#9;end
end
function noManualWelds(part)
&#9;local partChildren = part:GetChildren()
&#9;for i = 1, #partChildren do
&#9;&#9;if partChildren[i]:IsA(&quot;ManualWeld&quot;) or partChildren[i]:IsA(&quot;Rotate&quot;) then
&#9;&#9;&#9;return false
&#9;&#9;end
&#9;end
&#9;return true
end
local debris = game:GetService(&quot;Debris&quot;)
function flashRedBox()
&#9;errorBox.Parent = player.PlayerGui
&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then errorBox.Adornee = Data.Stamp.CurrentParts[1].Handle
&#9;else errorBox.Adornee = Data.Stamp.CurrentParts[1] end
&#9;delay(0,function()
&#9;&#9;for i = 1, 3 do
&#9;&#9;&#9;errorBox.Visible = true
&#9;&#9;&#9;wait(0.13)
&#9;&#9;&#9;errorBox.Visible = false
&#9;&#9;&#9;wait(0.13)
&#9;&#9;end
&#9;&#9;errorBox.Adornee = nil
&#9;&#9;errorBox.Parent = Tool
&#9;end)
end
-- below function should work as a Region3 query, returning true if a single cluster part is within this region
function clusterPartsInRegion(startVector, endVector)
&#9;if not cluster then return false end
&#9;local startCell = cluster:WorldToCell(startVector)
&#9;local endCell = cluster:WorldToCell(endVector)
&#9;local startX = startCell.X
&#9;local startY = startCell.Y
&#9;local startZ = startCell.Z
&#9;local endX = endCell.X
&#9;local endY = endCell.Y
&#9;local endZ = endCell.Z
&#9;if startX &lt; cluster.MaxExtents.Min.X then startX = cluster.MaxExtents.Min.X end
&#9;if startY &lt; cluster.MaxExtents.Min.Y then startY = cluster.MaxExtents.Min.Y end
&#9;if startZ &lt; cluster.MaxExtents.Min.Z then startZ = cluster.MaxExtents.Min.Z end
&#9;if endX &gt; cluster.MaxExtents.Max.X then endX = cluster.MaxExtents.Max.X end
&#9;if endY &gt; cluster.MaxExtents.Max.Y then endY = cluster.MaxExtents.Max.Y end
&#9;if endZ &gt; cluster.MaxExtents.Max.Z then endZ = cluster.MaxExtents.Max.Z end
&#9;for x = startX, endX do
&#9;&#9;for y = startY, endY do
&#9;&#9;&#9;for z = startZ, endZ do
&#9;&#9;&#9;&#9;if (cluster:GetCell(x, y, z).Value) &gt; 0 then return true end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;return false
end
-- helper function to determine if a character can be pushed upwards by a certain amount
-- character is 5 studs tall, we&apos;ll check a 1.5 x 1.5 x 4.5 box around char, with center .5 studs below torsocenter
function spaceAboveCharacter(charTorso, newTorsoY)
&#9;local partsAboveChar = game.Workspace:FindPartsInRegion3(Region3.new(Vector3.new(charTorso.Position.X, newTorsoY, charTorso.Position.Z) - Vector3.new(.75, 2.75, .75), Vector3.new(charTorso.Position.X, newTorsoY, charTorso.Position.Z) + Vector3.new(.75, 1.75, .75)), charTorso.Parent, 100)
&#9;for j = 1, #partsAboveChar do
&#9;&#9;if partsAboveChar[j].CanCollide and not partsAboveChar[j]:IsDescendantOf(Data.Stamp.CurrentParts[1]) then return false end
&#9;end
&#9;if clusterPartsInRegion(Vector3.new(charTorso.Position.X, newTorsoY, charTorso.Position.Z) - Vector3.new(.75, 2.75, .75), Vector3.new(charTorso.Position.X, newTorsoY, charTorso.Position.Z) + Vector3.new(.75, 1.75, .75)) then return false end
&#9;return true
end
-- returns whether or not we want to cancel the stamp because we&apos;re blocked by this part
function isBlocker(part)
&#9;if not part then return false end
&#9;if not part.Parent then return false end
&#9;if part:FindFirstChild(&quot;Humanoid&quot;) then return false end
&#9;if part:FindFirstChild(&quot;RobloxStamper&quot;) or part:FindFirstChild(&quot;RobloxModel&quot;) then return true end
&#9;if part:IsA(&quot;Part&quot;) and not part.CanCollide then return false end
&#9;if part == game.Workspace then return true end
&#9;if part == game.Lighting then return false end
&#9;return isBlocker(part.Parent)
end
function onInsertMouseButton1Up()
&#9;if guiScriptIsLoadingSomething or variables.InsertAsset.Updated.Value then return end -- don&apos;t try to stamp while we&apos;re loading!
&#9;if eyeDropperConnection then
&#9;&#9;eyeDropperConnection:disconnect()
&#9;&#9;eyeDropperConnection = nil
&#9;&#9;return
&#9;end
&#9;if Data.Stamp.MouseDown then
&#9;&#9;Data.Stamp.MouseDown = false
&#9;&#9;if Data.Stamp.Dragger then
&#9;&#9;&#9;--Place the object where the mouse is currently positioned
&#9;&#9;&#9;-- For Restricting Stamper Tool
&#9;&#9;&#9;while Data.Stamp.MouseLock do wait() end
&#9;&#9;&#9;onInsertMouseMove()
&#9;&#9;&#9;Data.Stamp.MouseLock = true
&#9;&#9;&#9;if(isRestricted) then
&#9;&#9;&#9;&#9;-- if player tries to stamp out of bounds, tell them they can&apos;t
&#9;&#9;&#9;&#9;if not inBounds(Data.Stamp.TransparencyTable) then
&#9;&#9;&#9;&#9;&#9;variables.ShowInvalidPlacement.Value = true
&#9;&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;&#9;HighScalabilityLine.Start = nil
&#9;&#9;&#9;&#9;&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;&#9;-- if unstampable face, then don&apos;t let us stamp there!
&#9;&#9;&#9;if unstampableSurface then
&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;HighScalabilityLine.Start = nil
&#9;&#9;&#9;&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;&#9;&#9;&#9;flashRedBox()
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;end
&#9;&#9;&#9;-- Prevent part from being stamped on top of a player
&#9;&#9;&#9;local minBB, maxBB = getBoundingBoxInWorldCoordinates(Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;local configFound, targetCFrame = findConfigAtMouseTarget(Data.Stamp.TransparencyTable)
&#9;&#9;&#9;if configFound and not HighScalabilityLine.Adorn.Parent then
&#9;&#9;&#9;&#9;if clusterPartsInRegion(minBB+insertBoundingBoxOverlapVector, maxBB-insertBoundingBoxOverlapVector) then Data.Stamp.MouseLock = false flashRedBox() return end
&#9;&#9;&#9;&#9;local blockingParts = game.Workspace:FindPartsInRegion3(Region3.new(minBB+insertBoundingBoxOverlapVector, maxBB-insertBoundingBoxOverlapVector), Data.Stamp.CurrentParts[1], 100)
&#9;&#9;&#9;&#9;for b = 1, #blockingParts do
&#9;&#9;&#9;&#9;&#9;-- below if we only want to block stamping on self
&#9;&#9;&#9;&#9;&#9;--if blockingParts[b].Parent == script.Parent.Parent then return end
&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;-- below if we want to block stamping on self and also stamping that intersects a model we&apos;ve previously stamped on our baseplate
&#9;&#9;&#9;&#9;&#9;--&#9;&#9; should work as soon as Region3 queries are fixed
&#9;&#9;&#9;&#9;&#9;-- NOTE TO SELF: See if partModel applies when isRestricted is false
&#9;&#9;&#9;&#9;&#9;--if blockingParts[b]:IsDescendantOf(partModel) or blockingParts[b].Parent == script.Parent.Parent then Data.Stamp.MouseLock = false flashRedBox() break end --return end
&#9;&#9;&#9;&#9;&#9;if isBlocker(blockingParts[b]) then Data.Stamp.MouseLock = false flashRedBox() return end-- still error if overlapping another model [should return here too!]
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;local alreadyPushedUp = {}
&#9;&#9;&#9;&#9;-- if no blocking model below, then see if stamping on top of a character
&#9;&#9;&#9;&#9;for b = 1, #blockingParts do
&#9;&#9;&#9;&#9;&#9;--if blockingParts[b].Parent == script.Parent.Parent then
--&#9;&#9;&#9;&#9;&#9;&#9;local blockingPersonTorso = script.Parent.Parent:FindFirstChild(&quot;Torso&quot;)
&#9;&#9;&#9;&#9;&#9;&#9;if blockingParts[b].Parent and not alreadyPushedUp[blockingParts[b].Parent] and blockingParts[b].Parent:FindFirstChild(&quot;Humanoid&quot;) and blockingParts[b].Parent:FindFirstChild(&quot;Humanoid&quot;):IsA(&quot;Humanoid&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;local blockingPersonTorso = blockingParts[b].Parent:FindFirstChild(&quot;Torso&quot;)
&#9;&#9;&#9;&#9;&#9;&#9;alreadyPushedUp[blockingParts[b].Parent] = true
&#9;&#9;&#9;&#9;&#9;&#9;if blockingPersonTorso then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- if so, let&apos;s push the person upwards so they pop on top of the stamped model/part (but only if there&apos;s space above them)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;local newY = maxBB.Y + 3
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if spaceAboveCharacter(blockingPersonTorso, newY) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;blockingPersonTorso.CFrame = blockingPersonTorso.CFrame + Vector3.new(0, newY - blockingPersonTorso.CFrame.p.Y, 0)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- if no space, we just error
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;flashRedBox()
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- should return here too!
&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;&#9;--break
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;elseif (not configFound) then
&#9;&#9;&#9;&#9;HighScalabilityLine.Start = nil
&#9;&#9;&#9;&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;end -- if no config then don&apos;t stamp!
&#9;&#9;&#9;-- something will be stamped! so set the &quot;StampedSomething&quot; toggle to true
&#9;&#9;&#9;local localChar = game.Players.LocalPlayer.Character
&#9;&#9;&#9;if localChar then
&#9;&#9;&#9;&#9;local stampTracker = localChar:FindFirstChild(&quot;StampTracker&quot;)
&#9;&#9;&#9;&#9;if stampTracker and not stampTracker.Value then stampTracker.Value = true end
&#9;&#9;&#9;end
&#9;&#9;&#9;-- also, show hints again if high scalability part
&#9;&#9;&#9;HighScalabilityLine.NewHint = true
&#9;&#9;&#9;if Data.Stamp.Model and Data.Stamp.Model:GetChildren()[1] and Data.Stamp.Model:GetChildren()[1].Name == &quot;MegaClusterCube&quot; then
&#9;&#9;&#9;&#9;&#9;local line = HighScalabilityLine.InternalLine
&#9;&#9;&#9;&#9;&#9;local cMax = game.Workspace.Terrain.MaxExtents.Max
&#9;&#9;&#9;&#9;&#9;local cMin = game.Workspace.Terrain.MaxExtents.Min
&#9;&#9;&#9;&#9;&#9;local clusterMaterial = 1 -- default is grass
&#9;&#9;&#9;&#9;&#9;local clusterType = 0 -- default is brick
&#9;&#9;&#9;&#9;&#9;local clusterOrientation = 0 -- default is 0 rotation
&#9;&#9;&#9;&#9;&#9;local autoWedgeClusterParts = false
&#9;&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;AutoWedge&quot;) then autoWedgeClusterParts = true end
&#9;&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;ClusterMaterial&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;clusterMaterial = Data.Stamp.CurrentParts[1].ClusterMaterial
&#9;&#9;&#9;&#9;&#9;&#9;if (clusterMaterial:IsA(&quot;Vector3Value&quot;)) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- extract all info from vector
&#9;&#9;&#9;&#9;&#9;&#9;&#9;clusterType = clusterMaterial.Value.Y
&#9;&#9;&#9;&#9;&#9;&#9;&#9;clusterOrientation = clusterMaterial.Value.Z
&#9;&#9;&#9;&#9;&#9;&#9;&#9;clusterMaterial = clusterMaterial.Value.X
&#9;&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;&#9;clusterMaterial = clusterMaterial.Value
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;
&#9;&#9;&#9;&#9;&#9;if HighScalabilityLine.Adorn.Parent and HighScalabilityLine.Start and ((HighScalabilityLine.Dimensions &gt; 1) or (line and line.magnitude &gt; 0)) then
&#9;&#9;&#9;&#9;&#9;&#9;local startCell = game.Workspace.Terrain:WorldToCell(HighScalabilityLine.Start)
&#9;&#9;&#9;&#9;&#9;&#9;local xInc = {0,0,0}
&#9;&#9;&#9;&#9;&#9;&#9;local yInc = {0,0,0}
&#9;&#9;&#9;&#9;&#9;&#9;local zInc = {0,0,0}
&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;&#9;local incrementVect = {nil, nil, nil}
&#9;&#9;&#9;&#9;&#9;&#9;local stepVect = {Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0)}
&#9;&#9;&#9;&#9;&#9;&#9;local worldAxes = {Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), Vector3.new(0, 0, 1)}
&#9;&#9;&#9;&#9;&#9;&#9;local lines = {}
&#9;&#9;&#9;&#9;&#9;&#9;if HighScalabilityLine.Dimensions &gt; 1 then table.insert(lines, HighScalabilityLine.MoreLines[1]) end
&#9;&#9;&#9;&#9;&#9;&#9;if line and line.magnitude &gt; 0 then table.insert(lines, line) end
&#9;&#9;&#9;&#9;&#9;&#9;if HighScalabilityLine.Dimensions &gt; 2 then table.insert(lines, HighScalabilityLine.MoreLines[2]) end
&#9;&#9;&#9;&#9;&#9;&#9;for i = 1, #lines do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;lines[i] = Vector3.new(math.floor(lines[i].X+.5), math.floor(lines[i].Y+.5), math.floor(lines[i].Z+.5)) -- round to integers
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if lines[i].X &gt; 0 then xInc[i] = 1 elseif lines[i].X &lt; 0 then xInc[i] = -1 end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if lines[i].Y &gt; 0 then yInc[i] = 1 elseif lines[i].Y &lt; 0 then yInc[i] = -1 end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if lines[i].Z &gt; 0 then zInc[i] = 1 elseif lines[i].Z &lt; 0 then zInc[i] = -1 end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;incrementVect[i] = Vector3.new(xInc[i], yInc[i], zInc[i])
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if incrementVect[i].magnitude &lt; .9 then incrementVect[i] = nil end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;if not lines[2] then lines[2] = Vector3.new(0, 0, 0) end
&#9;&#9;&#9;&#9;&#9;&#9;if not lines[3] then lines[3] = Vector3.new(0, 0, 0) end
&#9;&#9;&#9;&#9;&#9;&#9;while (stepVect[3].magnitude*4 &lt;= lines[3].magnitude) do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;local outerStepVectIndex = 1
&#9;&#9;&#9;&#9;&#9;&#9;&#9;while outerStepVectIndex &lt; 4 do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;stepVect[2] = Vector3.new(0, 0, 0)
&#9;&#9;&#9;&#9;&#9;&#9;while (stepVect[2].magnitude*4 &lt;= lines[2].magnitude) do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;local innerStepVectIndex = 1
&#9;&#9;&#9;&#9;&#9;&#9;&#9;while innerStepVectIndex &lt; 4 do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;stepVect[1] = Vector3.new(0, 0, 0)
&#9;&#9;&#9;&#9;&#9;&#9;while (stepVect[1].magnitude*4 &lt;= lines[1].magnitude) do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;local stepVectSum = stepVect[1] + stepVect[2] + stepVect[3]
&#9;&#9;&#9;&#9;&#9;&#9;&#9;local cellPos = Vector3int16.new(startCell.X + stepVectSum.X, startCell.Y + stepVectSum.Y, startCell.Z + stepVectSum.Z)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if cellPos.X &gt;= cMin.X and cellPos.Y &gt;= cMin.Y and cellPos.Z &gt;= cMin.Z and cellPos.X &lt; cMax.X and cellPos.Y &lt; cMax.Y and cellPos.Z &lt; cMax.Z then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- check if overlaps player or part:
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local cellCenter = game.Workspace.Terrain:CellCenterToWorld(cellPos.X, cellPos.Y, cellPos.Z)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local cellBlockingParts = game.Workspace:FindPartsInRegion3(Region3.new(cellCenter - Vector3.new(2, 2, 2) + insertBoundingBoxOverlapVector, cellCenter + Vector3.new(2, 2, 2) - insertBoundingBoxOverlapVector), Data.Stamp.CurrentParts[1], 100)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local skipThisCell = false
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for b = 1, #cellBlockingParts do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if isBlocker(cellBlockingParts[b]) then skipThisCell = true break end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if not skipThisCell then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- pop players up above any set cells
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local alreadyPushedUp = {}
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- if no blocking model below, then see if stamping on top of a character
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for b = 1, #cellBlockingParts do
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if cellBlockingParts[b].Parent and not alreadyPushedUp[cellBlockingParts[b].Parent] and cellBlockingParts[b].Parent:FindFirstChild(&quot;Humanoid&quot;) and cellBlockingParts[b].Parent:FindFirstChild(&quot;Humanoid&quot;):IsA(&quot;Humanoid&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local blockingPersonTorso = cellBlockingParts[b].Parent:FindFirstChild(&quot;Torso&quot;)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;alreadyPushedUp[cellBlockingParts[b].Parent] = true
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if blockingPersonTorso then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- if so, let&apos;s push the person upwards so they pop on top of the stamped model/part (but only if there&apos;s space above them)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;local newY = cellCenter.Y + 5
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if spaceAboveCharacter(blockingPersonTorso, newY) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;blockingPersonTorso.CFrame = blockingPersonTorso.CFrame + Vector3.new(0, newY - blockingPersonTorso.CFrame.p.Y, 0)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- if no space, we just skip this one
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;skipThisCell = true
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;break
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if not skipThisCell then -- if we STILL aren&apos;t skipping... then we&apos;re good to go!
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- set it
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;cluster:SetCell(cellPos.X, cellPos.Y, cellPos.Z, clusterMaterial, clusterType, clusterOrientation)
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;-- auto-wedge it?
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if (autoWedgeClusterParts) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;game.Workspace.Terrain:AutowedgeCells(Region3int16.new(Vector3int16.new(cellPos.x - 1, cellPos.y - 1, cellPos.z - 1), Vector3int16.new(cellPos.x + 1, cellPos.y + 1, cellPos.z + 1)))
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;stepVect[1] = stepVect[1] + incrementVect[1]
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if incrementVect[2] then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;while innerStepVectIndex &lt; 4 and worldAxes[innerStepVectIndex]:Dot(incrementVect[2]) == 0 do innerStepVectIndex = innerStepVectIndex + 1 end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if innerStepVectIndex &lt; 4 then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;stepVect[2] = stepVect[2] + worldAxes[innerStepVectIndex]*worldAxes[innerStepVectIndex]:Dot(incrementVect[2])
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;innerStepVectIndex = innerStepVectIndex + 1
&#9;&#9;&#9;&#9;&#9;&#9;&#9;else stepVect[2] = Vector3.new(1, 0, 0) innerStepVectIndex = 4 end -- skip all remaining loops
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if (stepVect[2].magnitude*4 &gt; lines[2].magnitude) then innerStepVectIndex = 4 end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;wait()
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if incrementVect[3] then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;while outerStepVectIndex &lt; 4 and worldAxes[outerStepVectIndex]:Dot(incrementVect[3]) == 0 do outerStepVectIndex = outerStepVectIndex + 1 end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if outerStepVectIndex &lt; 4 then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;stepVect[3] = stepVect[3] + worldAxes[outerStepVectIndex]*worldAxes[outerStepVectIndex]:Dot(incrementVect[3])
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;outerStepVectIndex = outerStepVectIndex + 1
&#9;&#9;&#9;&#9;&#9;&#9;&#9;else stepVect[3] = Vector3.new(1, 0, 0) outerStepVectIndex = 4 end -- skip all remaining loops
&#9;&#9;&#9;&#9;&#9;&#9;&#9;if (stepVect[3].magnitude*4 &gt; lines[3].magnitude) then outerStepVectIndex = 4 end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;-- and also get rid of any HighScalabilityLine stuff if it&apos;s there
&#9;&#9;&#9;&#9;&#9;&#9;HighScalabilityLine.Start = nil
&#9;&#9;&#9;&#9;&#9;&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;&#9;&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;-- not High-Scalability-Line-Based, so behave normally [and get rid of any HSL stuff]
&#9;&#9;&#9;&#9;HighScalabilityLine.Start = nil
&#9;&#9;&#9;&#9;HighScalabilityLine.Adorn.Parent = nil
&#9;&#9;&#9;&#9;-- if target point is in cluster, just use cluster:SetCell
&#9;&#9;&#9;&#9;if cluster then
&#9;&#9;&#9;&#9;&#9;-- if targetCFrame is inside cluster, just set that cell to 1 and return
&#9;&#9;&#9;&#9;&#9;local cellPos = cluster:WorldToCell(targetCFrame.p)
&#9;&#9;&#9;&#9;&#9;if cellPos.X &gt;= cMin.X and cellPos.Y &gt;= cMin.Y and cellPos.Z &gt;= cMin.Z and cellPos.X &lt; cMax.X and cellPos.Y &lt; cMax.Y and cellPos.Z &lt; cMax.Z then
&#9;&#9;&#9;&#9;&#9;&#9;cluster:SetCell(cellPos.X, cellPos.Y, cellPos.Z, clusterMaterial, clusterType, clusterOrientation)
&#9;&#9;&#9;&#9;&#9;&#9;-- auto-wedge it
&#9;&#9;&#9;&#9;&#9;&#9;if (autoWedgeClusterParts) then
&#9;&#9;&#9;&#9;&#9;&#9;&#9;game.Workspace.Terrain:AutowedgeCells(Region3int16.new(Vector3int16.new(cellPos.x - 1, cellPos.y - 1, cellPos.z - 1), Vector3int16.new(cellPos.x + 1, cellPos.y + 1, cellPos.z + 1)))
&#9;&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;&#9;&#9;&#9;return
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;&#9;-- Post process: after positioning the part or model, restore transparency, material, anchored and collide states and create joints
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) then
&#9;&#9;&#9;&#9;&#9;-- Tyler&apos;s magical hack-code for allowing/preserving clones of both Surface and Manual Welds... just don&apos;t ask X&lt;
&#9;&#9;&#9;&#9;&#9;manualWeldTable = {}
&#9;&#9;&#9;&#9;&#9;manualWeldParentTable = {}
&#9;&#9;&#9;&#9;&#9;saveTheWelds(Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1]:BreakJoints()
&#9;&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1]:MakeJoints()
&#9;&#9;&#9;&#9;&#9;restoreTheWelds()
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;-- if it&apos;s a model, we also want to fill in the playerID and playerName tags, if it has those (e.g. for the friend-only door)
&#9;&#9;&#9;&#9;playerIdTag = Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;PlayerIdTag&quot;)
&#9;&#9;&#9;&#9;playerNameTag = Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;PlayerNameTag&quot;)
&#9;&#9;&#9;&#9;if playerIdTag ~= nil then
&#9;&#9;&#9;&#9;&#9;tempPlayerValue = getPlayer()
&#9;&#9;&#9;&#9;&#9;if tempPlayerValue ~= nil then playerIdTag.Value = tempPlayerValue.userId end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;if playerNameTag ~= nil then
&#9;&#9;&#9;&#9;&#9;tempPlayerValue = getPlayer()
&#9;&#9;&#9;&#9;&#9;if tempPlayerValue ~= nil then playerNameTag.Value = tempPlayerValue.Name end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;-- ...and tag all inserted models for subsequent origin identification
&#9;&#9;&#9;&#9;-- if no RobloxModel tag already exists, then add it.
&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;RobloxModel&quot;) == nil then
&#9;&#9;&#9;&#9;&#9;local stringTag = Instance.new(&quot;BoolValue&quot;, Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;&#9;&#9;stringTag.Name = &quot;RobloxModel&quot;
&#9;&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;RobloxStamper&quot;) == nil then
&#9;&#9;&#9;&#9;&#9;&#9;local stringTag2 = Instance.new(&quot;BoolValue&quot;, Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;&#9;&#9;&#9;stringTag2.Name = &quot;RobloxStamper&quot;
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1]:BreakJoints()
&#9;&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;RobloxStamper&quot;) == nil then
&#9;&#9;&#9;&#9;&#9;local stringTag2 = Instance.new(&quot;BoolValue&quot;, Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;&#9;&#9;stringTag2.Name = &quot;RobloxStamper&quot;
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;&#9;
&#9;&#9;&#9;-- make sure all the joints are activated before restoring anchor states
&#9;&#9;&#9;if not createJoints then game.JointsService:CreateJoinAfterMoveJoints() end
&#9;&#9;&#9;click.Value = true
&#9;&#9;&#9;--Fix the transparency and material of all the parts
&#9;&#9;&#9;for part, transparency in pairs(Data.Stamp.TransparencyTable) do
&#9;&#9;&#9;&#9;part.Transparency = transparency
&#9;&#9;&#9;&#9;part.archivable = true
&#9;&#9;&#9;end
&#9;&#9;&#9;for part, material in pairs(Data.Stamp.MaterialTable) do
&#9;&#9;&#9;&#9;part.Material = material
&#9;&#9;&#9;end
&#9;&#9;&#9;for part, collide in pairs(Data.Stamp.CanCollideTable) do
&#9;&#9;&#9;&#9;part.CanCollide = collide
&#9;&#9;&#9;end
&#9;&#9;&#9;for part, anchored in pairs(Data.Stamp.AnchoredTable) do
&#9;&#9;&#9;&#9;part.Anchored = anchored
&#9;&#9;&#9;end
&#9;&#9;&#9;for decal, transparency in pairs(Data.Stamp.DecalTransparencyTable) do
&#9;&#9;&#9;&#9;decal.Transparency = transparency
&#9;&#9;&#9;end
&#9;&#9;&#9;if (Data.Stamp.CurrentParts[1] and Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot;) then
&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1].Transparency = 0
&#9;&#9;&#9;end
&#9;&#9;&#9;-- re-enable all seats
&#9;&#9;&#9;setSeatEnabledStatus(Data.Stamp.CurrentParts[1], true)
&#9;&#9;&#9;Data.Stamp.TransparencyTable = nil
&#9;&#9;&#9;Data.Stamp.MaterialTable = nil
&#9;&#9;&#9;Data.Stamp.CanCollideTable = nil
&#9;&#9;&#9;Data.Stamp.AnchoredTable = nil
&#9;&#9;&#9;-- ...and tag all inserted models for subsequent origin identification
&#9;&#9;&#9;-- if no RobloxModel tag already exists, then add it.
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;RobloxModel&quot;) == nil then
&#9;&#9;&#9;&#9;local stringTag = Instance.new(&quot;BoolValue&quot;, Data.Stamp.CurrentParts[1])
&#9;&#9;&#9;&#9;stringTag.Name = &quot;RobloxModel&quot;
&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;&#9;&#9;
&#9;&#9;&#9;-- set our object back to the player&apos;s plate
&#9;&#9;&#9;Data.Stamp.CurrentParts[1].Parent = partModel
&#9;&#9;&#9;--Re-enable the scripts
&#9;&#9;&#9;for index,script in pairs(Data.Stamp.DisabledScripts) do
&#9;&#9;&#9;&#9;script.Disabled = false
&#9;&#9;&#9;end
&#9;&#9;&#9;--Now that they are all marked enabled, reinsert them into the world so they start running
&#9;&#9;&#9;for index,script in pairs(Data.Stamp.DisabledScripts) do
&#9;&#9;&#9;&#9;local oldParent = script.Parent
&#9;&#9;&#9;&#9;script.Parent = nil
&#9;&#9;&#9;&#9;script:Clone().Parent = oldParent
&#9;&#9;&#9;end
&#9;&#9;&#9;Data.Stamp.DisabledScripts = nil
&#9;&#9;&#9;Data.Stamp.Dragger = nil
&#9;&#9;&#9;Data.Stamp.CurrentParts.Parent = nil
&#9;&#9;&#9;Data.Stamp.CurrentParts = nil
&#9;&#9;&#9;Data.Stamp.MouseLock = false
&#9;&#9;&#9;--Now set up a new instance of the object to allow a second copy to be stamped down
&#9;&#9;&#9;variables.Stamped.Value = true
&#9;&#9;&#9;variables.Stamped.Value = false
&#9;&#9;&#9;if isRestricted then
&#9;&#9;&#9;&#9;if checkPartLimit() then
&#9;&#9;&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;&#9;variables.ShowMaxedOut.Value = true
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
end
------------------------ EyeDropper Code -------------------------------------------
function onEyeDropperMouseButton1Down()
&#9;if eyeDropperMoveConnection then
&#9;&#9;eyeDropperMoveConnection:disconnect()
&#9;end
&#9;clearSelection()
&#9;if Mouse then
&#9;&#9;Mouse.Icon = &quot;http://www.roblox.com/asset?id=66887745&quot;
&#9;end
&#9;-- deny any attempt to clone something that wasn&apos;t stamped using the Stamper tool
&#9;if not Mouse or not Mouse.Target then
&#9;&#9;startEyeDropperOperation()
&#9;&#9;return
&#9;end
&#9;local isTerrainEyedroppering = false
&#9;if Mouse.Target == game.Workspace.Terrain then
&#9;&#9;-- want to eyedropper a terrain piece; gotta do a little extra footwork
&#9;&#9;print(&quot;Eyedroppering Terrain Piece&quot;)
&#9;&#9;local newTerrainPiece
&#9;&#9;-- gotta make the fake part here
&#9;&#9;local hitCell = game.Workspace.Terrain:WorldToCellPreferSolid(Mouse.Hit.p)
&#9;&#9;local cellMat, cellType, cellOrient = game.Workspace.Terrain:GetCell(hitCell.x, hitCell.y, hitCell.z)
&#9;&#9;if (cellType.Value == 1 or cellType.Value == 4) then newTerrainPiece = Instance.new(&quot;WedgePart&quot;) newTerrainPiece.formFactor = &quot;Custom&quot;
&#9;&#9;elseif (cellType.Value == 2) then newTerrainPiece = Instance.new(&quot;CornerWedgePart&quot;)
&#9;&#9;else newTerrainPiece = Instance.new(&quot;Part&quot;) newTerrainPiece.formFactor = &quot;Custom&quot; end
&#9;&#9;newTerrainPiece.Name = &quot;MegaClusterCube&quot;
&#9;&#9;newTerrainPiece.Size = Vector3.new(4, 4, 4)
&#9;&#9;newTerrainPiece.BottomSurface = &quot;Smooth&quot;
&#9;&#9;newTerrainPiece.TopSurface = &quot;Smooth&quot;
&#9;&#9;-- can add decals or textures here if feeling particularly adventurous... for now, can make a table of look-up colors
&#9;&#9;newTerrainPiece.BrickColor = getClosestColorToTerrainMaterial(cellMat.Value)
&#9;&#9;local sideways = 0
&#9;&#9;local flipped = math.pi
&#9;&#9;if cellType.Value == 4 then sideways = -math.pi/2 end
&#9;&#9;if cellType.Value == 2 or cellType.Value == 3 then flipped = 0 end
&#9;&#9;newTerrainPiece.CFrame = CFrame.Angles(0, math.pi/2*cellOrient.Value + flipped, sideways)
&#9;&#9;if cellType.Value == 3 then
&#9;&#9;&#9;local inverseCornerWedgeMesh = Instance.new(&quot;SpecialMesh&quot;)
&#9;&#9;&#9;inverseCornerWedgeMesh.MeshType = &quot;FileMesh&quot;
&#9;&#9;&#9;inverseCornerWedgeMesh.MeshId = &quot;http://www.roblox.com/asset?id=66832495&quot;
&#9;&#9;&#9;inverseCornerWedgeMesh.Scale = Vector3.new(2, 2, 2)
&#9;&#9;&#9;inverseCornerWedgeMesh.Parent = newTerrainPiece
&#9;&#9;end
&#9;&#9;local materialTag = Instance.new(&quot;Vector3Value&quot;)
&#9;&#9;materialTag.Value = Vector3.new(cellMat.Value, cellType.Value, cellOrient.Value)
&#9;&#9;materialTag.Name = &quot;ClusterMaterial&quot;
&#9;&#9;materialTag.Parent = newTerrainPiece
&#9;&#9;local tempModel = Instance.new(&quot;Model&quot;)
&#9;&#9;newTerrainPiece.Parent = tempModel
&#9;&#9;Data.Stamp.Model = tempModel
&#9;&#9;Data.Stamp.Model:BreakJoints()
&#9;&#9;isTerrainEyedroppering = true
&#9;end
&#9;local stamperTag = Mouse.Target.Parent:FindFirstChild(&quot;RobloxStamper&quot;)
&#9;if stamperTag == nil then stamperTag = Mouse.Target:FindFirstChild(&quot;RobloxStamper&quot;) end
&#9;if stamperTag == nil and not isTerrainEyedroppering then
&#9;&#9;startEyeDropperOperation()
&#9;&#9;return
&#9;end
&#9;local eyeDropperInstance
&#9;-- find out if the target part is part of a Roblox Set Model
&#9;local robloxModelTag = Mouse.Target.Parent:FindFirstChild(&quot;RobloxModel&quot;)
&#9;if robloxModelTag ~= nil then
&#9;&#9;eyeDropperInstance = Mouse.Target.Parent
&#9;else
&#9;&#9;eyeDropperInstance = Mouse.Target
&#9;end
&#9;
&#9;-- do not allow certain objects to be captured with eye-dropper
&#9;-- for now, locked parts
&#9;if eyeDropperInstance:IsA(&quot;Part&quot;) and eyeDropperInstance.Locked and not isTerrainEyedroppering then
&#9;&#9;startEyeDropperOperation()
&#9;else
&#9;&#9;if not isTerrainEyedroppering then
&#9;&#9;&#9;local cloneInstance = eyeDropperInstance:clone()
&#9;&#9;&#9;local tempModel = Instance.new(&quot;Model&quot;)
&#9;&#9;&#9;cloneInstance.Parent = tempModel
&#9;&#9;&#9;-- once more, we make sure it&apos;s on grid before eyedroppering
&#9;&#9;&#9;if not isOnGrid(tempModel) then startEyeDropperOperation() return end
&#9;&#9;&#9;Data.Stamp.Model = tempModel
&#9;&#9;&#9;Data.Stamp.Model:BreakJoints()
&#9;&#9;end
&#9;&#9;-- will create and position clone without requiring user to move the mouse&#9;&#9;
&#9;&#9;if isRestricted then
&#9;&#9;&#9;if checkPartLimit() then
&#9;&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;&#9;if Mouse and not mouseButton1UpCon then mouseButton1UpCon = Mouse.Button1Up:connect(onInsertMouseButton1Up) end
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;variables.ShowMaxedOut.Value = true
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;setupDraggableClone()
&#9;&#9;&#9;if Mouse and not mouseButton1UpCon then mouseButton1UpCon = Mouse.Button1Up:connect(onInsertMouseButton1Up) end
&#9;&#9;end
&#9;&#9;variables.SwitchLoaderToDialog.AssetImage.Value = &quot;0&quot;
&#9;&#9;variables.SwitchLoaderToDialog.DialogType.Value = &quot;SideDialog&quot;
&#9;&#9;variables.SwitchLoaderToDialog.Value = true
&#9;end
end
function onEyeDropperMouseMove()
&#9;if not(inGui) and not(inPalette) then
&#9;&#9;if not Mouse or not Mouse.Target then clearSelection() return end
&#9;&#9;local part = Mouse.Target
&#9;&#9;if part:IsA(&quot;Terrain&quot;) and Mouse.Hit then
&#9;&#9;&#9;selectionBox.Color = BrickColor.Green()
&#9;&#9;&#9;setTerrainSelection(Mouse.Hit.p)
&#9;&#9;elseif canEyeDropperObject(part) then
&#9;&#9;&#9;local model = findModel(part)
&#9;&#9;&#9;if model and isOnGrid(model) then &#9;&#9;
&#9;&#9;&#9;&#9;selectionBox.Color = BrickColor.Green()
&#9;&#9;&#9;&#9;setSelection(model)
&#9;&#9;&#9;elseif (not model) and isOnGrid(part) then
&#9;&#9;&#9;&#9;selectionBox.Color = BrickColor.Green()
&#9;&#9;&#9;&#9;setSelection(part)
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;clearSelection()
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;clearSelection()
&#9;&#9;end
&#9;end
end
function startEyeDropperOperation()
&#9;cancelAssetPlacement()
&#9;pressedEsc = false
&#9;signalInsertComplete(&quot;EyeDropper&quot;)
&#9;if mouseButton1UpCon then mouseButton1UpCon:disconnect() mouseButton1UpCon = nil end
&#9;if eyeDropperConnection then
&#9;&#9;eyeDropperConnection:disconnect()
&#9;&#9;eyeDropperConnection = nil
&#9;end
&#9;if eyeDropperMoveConnection then eyeDropperMoveConnection:disconnect() end
&#9;if Mouse then
&#9;&#9;--Mouse.Icon =&quot;rbxasset://textures//DropperCursor.png&quot;
&#9;&#9;Mouse.Icon = &quot;http://www.roblox.com/asset?id=67163166&quot;
&#9;&#9;eyeDropperConnection = Mouse.Button1Up:connect(onEyeDropperMouseButton1Down)
&#9;&#9;eyeDropperMoveConnection = Mouse.Move:connect(onEyeDropperMouseMove)
&#9;end
end
function findModel(part)
&#9;if isRestricted then
&#9;&#9;while part ~= nil do
&#9;&#9;&#9;if part.className == &quot;Model&quot; and part.Name ~= playerModel.Name and part.Name ~= &quot;GarbageParts&quot; then
&#9;&#9;&#9;&#9;return part
&#9;&#9;&#9;elseif part.Name == playerModel.Name or part.Name == &quot;GarbageParts&quot; then
&#9;&#9;&#9;&#9;return nil
&#9;&#9;&#9;end
&#9;&#9;&#9;part = part.Parent
&#9;&#9;end
&#9;&#9;return nil
&#9;else
&#9;&#9;while part ~= game.Workspace do
&#9;&#9;&#9;if part:FindFirstChild(&quot;RobloxModel&quot;) then
&#9;&#9;&#9;&#9;return part
&#9;&#9;&#9;end
&#9;&#9;&#9;part = part.Parent
&#9;&#9;end
&#9;&#9;return nil
&#9;end
end
------------------------ End EyeDropper Code ---------------------------------------
------------------------ Start Selection Highlighting Code --------------------------
function setTerrainSelection(point)
&#9;if selectionBox then
&#9;&#9;local cell = game.Workspace.Terrain:WorldToCellPreferSolid(point)
&#9;&#9;local cellCenter = game.Workspace.Terrain:CellCenterToWorld(cell.X, cell.Y, cell.Z)
&#9;&#9;terrainSelectionBox.CFrame = CFrame.new(cellCenter)
&#9;&#9;selectionBox.Adornee = terrainSelectionBox
&#9;end
end
&#9;
function setSelection(partOrModel)
&#9;if partOrModel ~= currentSelection then
&#9;&#9;clearSelection()
&#9;&#9;currentSelection = partOrModel
&#9;&#9;selectionBox.Adornee = currentSelection
&#9;end
end
function clearSelection()
&#9;if currentSelection ~= nil then
&#9;&#9;for part, color in pairs(currentSelectionColors) do
&#9;&#9;&#9;part.BrickColor = color
&#9;&#9;end
&#9;&#9;selectionBox.Adornee = nil
&#9;end
&#9;currentSelectionColors = {}
&#9;-- I put these inside if statements, because we can&apos;t assume these exist. (Jahr, 12-29-2010)
&#9;if currentSelection then currentSelection = nil end
&#9;if selectionBox then selectionBox.Adornee = nil end
end
------------------------ End Selection Highlighting Code --------------------------
function autoAlignToFace()
&#9;local aatf = Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;AutoAlignToFace&quot;)
&#9;if aatf then return aatf.Value else return false end
end
function autoAlignHelper()
&#9;local model = Data.Stamp.CurrentParts[1]
&#9;local aatfTag = model:FindFirstChild(&quot;AutoAlignToFace&quot;)
&#9;if not aatfTag then
&#9;&#9;aatfTag = Instance.new(&quot;IntValue&quot;)
&#9;&#9;aatfTag.Name = &quot;AutoAlignToFace&quot;
&#9;&#9;aatfTag.Parent = Data.Stamp.CurrentParts[1]
&#9;&#9;aatfTag.Value = 3
&#9;end
&#9;aatfTag.Value = aatfTag.Value + 1
&#9;if aatfTag.Value &gt; 3 then aatfTag.Value = 0 end
end
function unstampableFaceHelper()
&#9;if not Mouse or not Mouse.Target then return end
&#9;local model = Mouse.Target
&#9;if not model then return end
&#9;if not model:FindFirstChild(&quot;RobloxModel&quot;) then model = model.Parent end
&#9;if not model then return end
&#9;if not model:FindFirstChild(&quot;RobloxModel&quot;) then return end
&#9;local ufhTag = model:FindFirstChild(&quot;UnstampableFaces&quot;)
&#9;if not ufhTag then
&#9;&#9;ufhTag = Instance.new(&quot;StringValue&quot;)
&#9;&#9;ufhTag.Name = &quot;UnstampableFaces&quot;
&#9;&#9;ufhTag.Parent = model
&#9;&#9;ufhTag.Value = &quot;&quot;
&#9;end
&#9;
&#9;local hitFace = modelTargetSurface(model, game.Workspace.CurrentCamera.CoordinateFrame.p, Mouse.Hit.p)
&#9;-- put string list into table form
&#9;breakingFaceList = {}
&#9;for bf = -3, 3 do
&#9;&#9;breakingFaceList[bf] = false
&#9;end
&#9;for bf in string.gmatch(ufhTag.Value, &quot;[^,]+&quot;) do
&#9;&#9;breakingFaceList[tonumber(bf)] = true
&#9;end
&#9;-- toggle value of hit face
&#9;breakingFaceList[hitFace] = not breakingFaceList[hitFace]
&#9;-- put table form back into string value
&#9;ufhTag.Value = &quot;&quot;
&#9;local seenAValueSoFar = false
&#9;for bf = -3, 3 do
&#9;&#9;if bf ~= 0 then -- ignore 0 face, since that doesn&apos;t exist
&#9;&#9;&#9;if breakingFaceList[bf] then
&#9;&#9;&#9;&#9;if seenAValueSoFar then ufhTag.Value = ufhTag.Value .. &quot;,&quot; .. tostring(bf)
&#9;&#9;&#9;&#9;else ufhTag.Value = tostring(bf) seenAValueSoFar = true end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
end
function justificationHelper(whichAxis)
&#9;local model = Data.Stamp.CurrentParts[1]
&#9;local justTag = model:FindFirstChild(&quot;Justification&quot;)
&#9;if not justTag then
&#9;&#9;justTag = Instance.new(&quot;Vector3Value&quot;)
&#9;&#9;justTag.Name = &quot;Justification&quot;
&#9;&#9;justTag.Parent = Data.Stamp.CurrentParts[1]
&#9;&#9;justTag.Value = Vector3.new(1, 1, 1)
&#9;end
&#9;local oldValue = justTag.Value
&#9;if whichAxis == 1 then
&#9;&#9;if oldValue.X == 2 then justTag.Value = Vector3.new(0, oldValue.Y, oldValue.Z)
&#9;&#9;else justTag.Value = Vector3.new(oldValue.X+1, oldValue.Y, oldValue.Z) end
&#9;elseif whichAxis == 2 then
&#9;&#9;if oldValue.Y == 2 then justTag.Value = Vector3.new(oldValue.X, 0, oldValue.Z)
&#9;&#9;else justTag.Value = Vector3.new(oldValue.X, oldValue.Y+1, oldValue.Z) end
&#9;elseif whichAxis == 3 then
&#9;&#9;if oldValue.Z == 2 then justTag.Value = Vector3.new(oldValue.X, oldValue.Y, 0)
&#9;&#9;else justTag.Value = Vector3.new(oldValue.X, oldValue.Y, oldValue.Z+1) end
&#9;end
end
function onInsertKeyDown(key)
&#9;key = string.lower(key)
&#9;if Data.Stamp.Dragger then
&#9;&#9;if key == &apos;c&apos; and Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot; and HighScalabilityLine.InternalLine and HighScalabilityLine.InternalLine.magnitude &gt; 0 and HighScalabilityLine.Dimensions &lt; 3 then
&#9;&#9;&#9;HighScalabilityLine.MorePoints[HighScalabilityLine.Dimensions] = HighScalabilityLine.End
&#9;&#9;&#9;HighScalabilityLine.MoreLines[HighScalabilityLine.Dimensions] = HighScalabilityLine.InternalLine
&#9;&#9;&#9;HighScalabilityLine.Dimensions = HighScalabilityLine.Dimensions + 1
&#9;&#9;&#9;HighScalabilityLine.NewHint = true
&#9;&#9;end
&#9;&#9;if key == &apos;r&apos; and not autoAlignToFace() then
&#9;&#9;&#9;-- Update orientation value if this is a fake terrain part
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1].Name == &quot;MegaClusterCube&quot; then
&#9;&#9;&#9;&#9;local clusterValues = Data.Stamp.CurrentParts[1]:FindFirstChild(&quot;ClusterMaterial&quot;)
&#9;&#9;&#9;&#9;if clusterValues and clusterValues:IsA(&quot;Vector3Value&quot;) then
&#9;&#9;&#9;&#9;&#9;clusterValues.Value = Vector3.new(clusterValues.Value.X, clusterValues.Value.Y, (clusterValues.Value.Z+1)%4)
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;&#9;-- Rotate the parts or all the parts in the model
&#9;&#9;&#9;local ry = math.pi/2
&#9;&#9;&#9;local rotCF = CFrame.fromEulerAnglesXYZ(0, ry, 0)
&#9;&#9;&#9;gInitial90DegreeRotations = gInitial90DegreeRotations + 1
&#9;&#9;&#9;if Data.Stamp.CurrentParts[1]:IsA(&quot;Model&quot;) or Data.Stamp.CurrentParts[1]:IsA(&quot;Tool&quot;) then
&#9;&#9;&#9;&#9;for i, object in pairs(Data.Stamp.CurrentParts[1]:GetChildren()) do
&#9;&#9;&#9;&#9;&#9;if object:IsA(&quot;Flag&quot;) then object = object.Handle end
&#9;&#9;&#9;&#9;&#9;if object:IsA(&quot;Part&quot;) or object:IsA(&quot;TrussPart&quot;) or object:IsA(&quot;WedgePart&quot;) or object:IsA(&quot;CornerWedgePart&quot;) or object:IsA(&quot;Seat&quot;) or object:IsA(&quot;VehicleSeat&quot;) then
&#9;&#9;&#9;&#9;&#9;&#9;object.CFrame = rotCF * object.CFrame
&#9;&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;else
&#9;&#9;&#9;&#9;Data.Stamp.CurrentParts[1].CFrame = rotCF * Data.Stamp.CurrentParts[1].CFrame
&#9;&#9;&#9;end
&#9;&#9;&#9;-- After rotating, update the position
&#9;&#9;&#9;configFound, targetCFrame = findConfigAtMouseTarget(Data.Stamp.TransparencyTable)
&#9;&#9;&#9;if configFound then
&#9;&#9;&#9;&#9;positionPartsAtCFrame3(Data.Stamp.CurrentParts[1], targetCFrame)
&#9;&#9;&#9;&#9;
&#9;&#9;&#9;&#9;-- update everything else in MouseMove
&#9;&#9;&#9;&#9;onInsertMouseMove()
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;if key == &apos;e&apos; then
&#9;&#9;startEyeDropperOperation()
&#9;elseif key == &apos;q&apos; then
&#9;&#9;pressedEsc = true
&#9;&#9;if eyeDropperConnection then
&#9;&#9;&#9;eyeDropperConnection:disconnect()
&#9;&#9;&#9;eyeDropperConnection = nil
&#9;&#9;end
&#9;&#9;if eyeDropperMoveConnection then eyeDropperMoveConnection:disconnect() end
&#9;&#9;if Mouse and not mouseButton1UpCon then mouseButton1UpCon = Mouse.Button1Up:connect(onInsertMouseButton1Up) end
&#9;&#9;clearSelection()
&#9;&#9;cancelAssetPlacement()
&#9;&#9;Data.Loading.Cancelled = true
&#9;&#9;signalInsertComplete(&quot;Main&quot;)
&#9;end
&#9;
&#9;-- admin-only tools: helpful functions for construction purposes
&#9;if adminAccess then
&#9;&#9;if key == &apos;L&apos; or key == &apos;l&apos; then
&#9;&#9;&#9;-- autoalign helper
&#9;&#9;&#9;if Data.Stamp.Dragger then autoAlignHelper() onInsertMouseMove() end
&#9;&#9;elseif key == &apos;U&apos; or key == &apos;u&apos; then
&#9;&#9;&#9;-- unstampable face helper
&#9;&#9;&#9;unstampableFaceHelper()
&#9;&#9;--elseif key == &apos;C&apos; or key == &apos;c&apos; then
--&#9;&#9;&#9;if Data.Stamp.Dragger then justificationHelper() end -- the &apos;c&apos; stands for &quot;Centering&quot; since &quot;j&quot; is already reserved by GuiScript
&#9;&#9;--end
&#9;&#9;elseif key == &apos;X&apos; or key == &apos;x&apos; then -- change x justification
&#9;&#9;&#9;if Data.Stamp.Dragger then justificationHelper(1) onInsertMouseMove() end
&#9;&#9;elseif key == &apos;Y&apos; or key == &apos;y&apos; then -- change y justification
&#9;&#9;&#9;if Data.Stamp.Dragger then justificationHelper(2) onInsertMouseMove() end
&#9;&#9;elseif key == &apos;Z&apos; or key == &apos;z&apos; then -- change z justification
&#9;&#9;&#9;if Data.Stamp.Dragger then justificationHelper(3) onInsertMouseMove() end
&#9;&#9;end
&#9;end
end
function onEquippedLocal(newMouse)
&#9;Mouse = newMouse
&#9;player = getPlayer()
&#9;-- if equip goes through while in backpack (so getPlayer() returns nil), we don&apos;t want to process anything else
&#9;if not player then return end
&#9;--[[if game:FindFirstChild(&quot;NetworkClient&quot;) and game.CoreGui.Version &gt;= 7 then only show billboards in online mode
&#9;&#9;if not billBoardOwnerGui then billBoardOwnerGui = generateOwnerGui(player.Name) end
&#9;end]]
&#9;if isRestricted then
&#9;&#9;if game.Workspace:FindFirstChild(&quot;BuildingAreas&quot;) then
&#9;&#9;&#9;local areas = game.Workspace.BuildingAreas:GetChildren()
&#9;&#9;&#9;for i = 1, #areas do
&#9;&#9;&#9;&#9;if areas[i]:FindFirstChild(&quot;Player&quot;) and areas[i].Player.Value == Tool.Parent.Name then
&#9;&#9;&#9;&#9;&#9;playerModel = areas[i]:FindFirstChild(&quot;PlayerArea&quot;)
&#9;&#9;&#9;&#9;&#9;break
&#9;&#9;&#9;&#9;end
&#9;&#9;&#9;end
&#9;&#9;end
&#9;else
&#9;&#9;playerModel = game.Workspace
&#9;&#9;-- give them a topHint gui too, if they don&apos;t have it since the place won&apos;t already have it&#9;
&#9;&#9;if not player.PlayerGui:FindFirstChild(&quot;topHint&quot;) then
&#9;&#9;&#9;local topHintGui = script.Parent:FindFirstChild(&quot;topHint&quot;)
&#9;&#9;&#9;if topHintGui then
&#9;&#9;&#9;&#9;topHintGui:Clone().Parent = player.PlayerGui
&#9;&#9;&#9;end
&#9;&#9;end
&#9;end
&#9;if not playerModel then return end
&#9;-- used to move object when walking
&#9;cameraChangeCon = game.Players.LocalPlayer.Character.Humanoid.Running:connect(function(speed)
&#9;&#9;if speed &gt; 0 then
&#9;&#9;&#9;walking = true
&#9;&#9;&#9;while walking and cameraChangeCon do
&#9;&#9;&#9;&#9;onInsertMouseMove()
&#9;&#9;&#9;&#9;wait(1.0/30.0)
&#9;&#9;&#9;end
&#9;&#9;else
&#9;&#9;&#9;walking = false
&#9;&#9;end
&#9;end)
&#9;if Mouse then
&#9;&#9;mouseMoveCon = newMouse.Move:connect(onInsertMouseMove)
&#9;&#9;mouseButton1DownCon = newMouse.Button1Down:connect(onInsertMouseButton1Down)
&#9;&#9;mouseButton1UpCon = newMouse.Button1Up:connect(onInsertMouseButton1Up)
&#9;&#9;newMouse.KeyDown:connect(onInsertKeyDown)
&#9;end
&#9;if(isRestricted) then
&#9;&#9;local takenAreas = game.Workspace.BuildingAreas:GetChildren()
&#9;&#9;waitForChild(player, &quot;playerNumber&quot;)
&#9;&#9;if(player.playerNumber.Value == 0) then
&#9;&#9;&#9;buildingPlate = nil
&#9;&#9;&#9;partModel = nil
&#9;&#9;else
&#9;&#9;&#9;waitForChild(game.Workspace, &quot;BuildingAreas&quot;)
&#9;&#9;&#9;local buildingAreas = game.Workspace.BuildingAreas
&#9;&#9;&#9;waitForChild(buildingAreas, &quot;Area&quot;..tostring(player.playerNumber.Value))
&#9;&#9;&#9;local targetArea = buildingAreas:FindFirstChild(&quot;Area&quot;..tostring(player.playerNumber.Value))
&#9;&#9;&#9;
&#9;&#9;&#9;waitForChild(targetArea, &quot;PlayerArea&quot;)
&#9;&#9;&#9;waitForChild(targetArea.PlayerArea, &quot;BasePlate&quot;)
&#9;&#9;&#9;buildingPlate = targetArea.PlayerArea.BasePlate
&#9;&#9;&#9;partModel = targetArea.PlayerArea
&#9;&#9;end
&#9;else
&#9;&#9;partModel = game.Workspace
&#9;end
&#9;selectionBox = Instance.new(&quot;SelectionBox&quot;)
&#9;selectionBox.Name = &quot;Model Delete Selection&quot;
&#9;selectionBox.Color = BrickColor.Red()
&#9;selectionBox.Adornee = nil
&#9;selectionBox.Parent = player.PlayerGui
&#9;alreadyMoving = false
end
function onUnequipped()
&#9;Mouse = nil
&#9;if mouseMoveCon then mouseMoveCon:disconnect() end
&#9;if mouseButton1DownCon then mouseButton1DownCon:disconnect() end
&#9;if mouseButton1UpCon then mouseButton1UpCon:disconnect() end
&#9;if cameraChangeCon then cameraChangeCon:disconnect() cameraChangeCon = nil end
&#9;if billBoardOwnerGui then billBoardOwnerGui:Remove() end
&#9;cancelAssetPlacement()
&#9;clearSelection()
&#9;if selectionBox then selectionBox:Remove() end
end
----------------------------------------------------------------------------------------
-- Lua Start Script
Tool.Equipped:connect(function(newMouse) onEquippedLocal(newMouse) end)
waitForChild(variables,&quot;InsertAsset&quot;)
waitForChild(variables.InsertAsset, &quot;Updated&quot;)
variables.InsertAsset.Updated.Changed:connect(function(prop)
&#9;if variables.InsertAsset.Updated.Value == true then
&#9;&#9;pressedEsc = false
&#9;&#9;beginInsertAssetStamp(variables.InsertAsset.AssetName.Value, variables.InsertAsset.AssetId.Value,
&#9;&#9;&#9;variables.InsertAsset.Image.Value, variables.InsertAsset.StampMode.Value)
&#9;&#9;variables.InsertAsset.Updated.Value = false
&#9;end
end)
waitForChild(variables, &quot;SwitchMode&quot;)
waitForChild(variables.SwitchMode, &quot;Mode&quot;)
variables.SwitchMode.Changed:connect(function()
&#9;if variables.SwitchMode.Value == true then
&#9;&#9;if variables.SwitchMode.Mode.Value == &quot;Clone&quot; then
&#9;&#9;&#9;startEyeDropperOperation()
&#9;&#9;end
&#9;&#9;variables.SwitchMode.Value = false
&#9;end
end)
waitForChild(variables, &quot;ReloadCurrentAsset&quot;)
variables.ReloadCurrentAsset.Changed:connect(function()
&#9;if variables.ReloadCurrentAsset.Value == true then
&#9;&#9;setupDraggableClone()
&#9;&#9;variables.ReloadCurrentAsset.Value = false
&#9;end
end)
Tool.Unequipped:connect(function() onUnequipped() end)
----------------------------------------------------------------------------------------
</ProtectedString>
</Properties>
</Item>
<Item class="ScreenGui" referent="RBX101">
<Properties>
<string name="Name">topHint</string>
</Properties>
<Item class="ImageLabel" referent="RBX102">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<Content name="Image"><null></null></Content>
<string name="Name">_preview</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">false</bool>
<int name="ZIndex">1</int>
</Properties>
<Item class="Frame" referent="RBX103">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<string name="Name">Bkg</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-250</XO>
<YS>0</YS>
<YO>10</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>400</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">3</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
<Item class="TextButton" referent="RBX104">
<Properties>
<bool name="Active">true</bool>
<bool name="AutoButtonColor">true</bool>
<Color3 name="BackgroundColor3">4288914085</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="ClipsDescendants">false</bool>
<bool name="Draggable">false</bool>
<token name="Font">0</token>
<token name="FontSize">5</token>
<bool name="Modal">false</bool>
<string name="Name">Label</string>
<UDim2 name="Position">
<XS>0.25</XS>
<XO>0</XO>
<YS>0</YS>
<YO>10</YO>
</UDim2>
<bool name="Selected">false</bool>
<UDim2 name="Size">
<XS>0.5</XS>
<XO>0</XO>
<YS>0</YS>
<YO>40</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<string name="Text">Saved changes</string>
<Color3 name="TextColor3">4294967295</Color3>
<Color3 name="TextStrokeColor3">4278190080</Color3>
<float name="TextStrokeTransparency">1</float>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
</Properties>
</Item>
</Item>
<Item class="LocalScript" referent="RBX105">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Add</string>
<ProtectedString name="Source">-- This script&apos;s job is to destroy previous topHint instance (if exists) and clone and run a new _topHint script (naming it &quot;topHint&quot;)
-- When this script is finished, it disables and resets itself.
function waitForChild(instance, name)
&#9;while not instance:FindFirstChild(name) do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
function waitForNoChild(instance, name)
&#9;while instance:FindFirstChild(name) do
&#9;&#9;instance.ChildRemoved:wait()
&#9;end
end
function waitForAnyChild(instance)
&#9;while not instance:GetChildren()[1] do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
waitForChild(script, &quot;Label&quot;)
waitForChild(script, &quot;Time&quot;)
waitForChild(script, &quot;Width&quot;)
waitForChild(script.Parent, &quot;_topHint&quot;)
waitForChild(script.Parent._topHint, &quot;Label&quot;)
waitForChild(script.Parent._topHint, &quot;HideTime&quot;)
waitForChild(script.Parent._topHint, &quot;Width&quot;)
local width = 0.55--script.Width.Value
--width = math.min(0.55,width/script.Parent.AbsoluteSize.X)
local quickReplace = true
-- If there&apos;s already an instance, do you quickly replace the text and width (true), or animate out then in? (false)
if (script.Parent:FindFirstChild(&quot;topHint&quot;)~=nil) then
&#9;-- If there&apos;s already an instance...
&#9;if(quickReplace) then
&#9;&#9;-- If quickReplace is true...
&#9;&#9;local bkg = script.Parent.Bkg
&#9;&#9;local label = script.Parent.Label
&#9;&#9;local ys = bkg.Position.Y.Scale
&#9;&#9;local yo = bkg.Position.Y.Offset
&#9;&#9;bkg.Position = UDim2.new((1 - width)/2,0, ys, yo)
&#9;&#9;bkg.Size = UDim2.new(width,0, 0, 40)
&#9;&#9;label.Text = script.Label.Value
&#9;&#9;script.Parent.topHint.HideTime.Value = time() + script.Time.Value
&#9;else
&#9;&#9;-- If quickReplace is false...
&#9;&#9;script.Parent.Delete.Disabled = false
&#9;&#9;-- Wait for instance to be removed
&#9;&#9;waitForNoChild(script.Parent, &quot;topHint&quot;)
&#9;&#9;waitForNoChild(script.Parent, &quot;Bkg&quot;)
&#9;&#9;waitForNoChild(script.Parent, &quot;Label&quot;)
&#9;end
else
&#9;-- There&apos;s no previous instance.
&#9;-- Clone and enable a new instance
&#9;local topHint = script.Parent._topHint:Clone()
&#9;topHint.Parent = script.Parent
&#9;topHint.Name = &quot;topHint&quot;
&#9;topHint.Label.Value = script.Label.Value
&#9;topHint.HideTime.Value = time() + script.Time.Value
&#9;topHint.Width.Value = width
&#9;topHint.Disabled = false
end
script.Disabled = true
</ProtectedString>
</Properties>
<Item class="NumberValue" referent="RBX106">
<Properties>
<string name="Name">Width</string>
<double name="Value">0</double>
</Properties>
</Item>
<Item class="StringValue" referent="RBX107">
<Properties>
<string name="Name">Label</string>
<string name="Value"></string>
</Properties>
</Item>
<Item class="NumberValue" referent="RBX108">
<Properties>
<string name="Name">Time</string>
<double name="Value">0</double>
</Properties>
</Item>
</Item>
<Item class="LocalScript" referent="RBX109">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">_topHint</string>
<ProtectedString name="Source">function waitForChild(instance, name)
&#9;while not instance:FindFirstChild(name) do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
function waitForNoChild(instance, name)
&#9;while instance:FindFirstChild(name) do
&#9;&#9;instance.ChildRemoved:wait()
&#9;end
end
function waitForAnyChild(instance)
&#9;while not instance:GetChildren()[1] do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
-- This script creates the graphics for the new topHint, and animates it.
-- Before calling this script, we&apos;ve already made sure: there&apos;s no other &quot;topHint&quot;, &quot;Bkg&quot;, and &quot;Label&quot;
-- Then, if time~=0, it waits &quot;time&quot; and then calls &quot;Remove&quot; script
waitForChild(script, &quot;Label&quot;)
waitForChild(script, &quot;HideTime&quot;)
waitForChild(script, &quot;Width&quot;)
local container = script.Parent
local labelText = script.Label.Value
local hideTime = script.HideTime.Value
local width = script.Width.Value
-- SETTINGS
local tweenTime = 0.3 -- animation time (seconds)
local topY = -50
local bottomY = 10
local easing = &quot;Sine.easeInOut&quot;
--
local bkg = Instance.new(&quot;Frame&quot;)
bkg.Parent = container
bkg.Name = &quot;Bkg&quot;
bkg.Position = UDim2.new((1 - width)/2,0, ys, yo)
bkg.Size = UDim2.new(width,0, 0, 40)
bkg.Style = &quot;RobloxRound&quot;
function destroy()
&#9;script.Parent.Delete.Disabled = false
end
local label = Instance.new(&quot;TextButton&quot;)
label.Parent = container
label.Name = &quot;Label&quot;
label.BackgroundTransparency = 1
label.FontSize = &quot;Size14&quot;
label.Position = UDim2.new((1 - width)/2,0, 0, topY)
label.Size = UDim2.new(width,0, 0, 40)
label.Text = labelText
label.TextColor3 = Color3.new(1, 1, 1)
label.MouseButton1Click:connect(destroy)
bkg:TweenPosition(UDim2.new(bkg.Position.X.Scale,bkg.Position.X.Offset,bkg.Position.Y.Scale,bottomY),
&#9;&#9;Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,tweenTime,true)
label:TweenPosition(UDim2.new(label.Position.X.Scale,label.Position.X.Offset,label.Position.Y.Scale,bottomY),
&#9;&#9;Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,tweenTime,true)
if(hideTime~=0) then
&#9;while(time() &lt; hideTime) do wait(0.1) end
&#9;destroy()
end</ProtectedString>
</Properties>
<Item class="NumberValue" referent="RBX110">
<Properties>
<string name="Name">Width</string>
<double name="Value">0</double>
</Properties>
</Item>
<Item class="StringValue" referent="RBX111">
<Properties>
<string name="Name">Label</string>
<string name="Value"></string>
</Properties>
</Item>
<Item class="NumberValue" referent="RBX112">
<Properties>
<string name="Name">HideTime</string>
<double name="Value">0</double>
</Properties>
</Item>
</Item>
<Item class="LocalScript" referent="RBX113">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Delete</string>
<ProtectedString name="Source">function waitForChild(instance, name)
&#9;while not instance:FindFirstChild(name) do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
function waitForNoChild(instance, name)
&#9;while instance:FindFirstChild(name) do
&#9;&#9;instance.ChildRemoved:wait()
&#9;end
end
function waitForAnyChild(instance)
&#9;while not instance:GetChildren()[1] do
&#9;&#9;instance.ChildAdded:wait()
&#9;end
end
local topHint = script.Parent:FindFirstChild(&quot;topHint&quot;)
local bkg = script.Parent:FindFirstChild(&quot;Bkg&quot;)
local label = script.Parent:FindFirstChild(&quot;Label&quot;)
-- SETTINGS
local tweenTime = 0.3 -- animation time (seconds)
local topY = -50 -- top position (Y Offset)
local easing = &quot;Back.easeInOut&quot;
--
if(topHint~=nil) then
&#9;topHint:Remove()
end
if(bkg~=nil) then
&#9;bkg:TweenPosition(UDim2.new(bkg.Position.X.Scale,bkg.Position.X.Offset,bkg.Position.Y.Scale,topY),
&#9;&#9;Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,tweenTime,true)
end
if(label~=nil) then
&#9;label:TweenPosition(UDim2.new(label.Position.X.Scale,label.Position.X.Offset,label.Position.Y.Scale,topY),
&#9;&#9;Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,tweenTime,true)
end
wait(tweenTime)
if(bkg~=nil) then bkg:Remove() end
if(label~=nil) then label:Remove() end
script.Disabled = true
</ProtectedString>
</Properties>
</Item>
<Item class="LocalScript" referent="RBX114">
<Properties>
<bool name="Disabled">true</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">_readme</string>
<ProtectedString name="Source">--
-- Top Hint
--
-- * This is a string of text that&apos;s top-centered in the window. (White text on black background)
-- * It should be used for messages from the client, and never from the place creator.
--
-- FEATURES:
-- * Auto-hides previous messages before showing yours.
-- * Always centered, regardless of length.
-- * Clicking the message hides it.
--
-- USE IT FOR:
-- * Quick task-related (non-essential) hints
-- * Showing the current modal state
-- * Tool hints (for the currently equipped tool)
-- * Keyboard shortcuts
--
-- NEVER USE IT FOR:
-- * Essential information (Use a popup instead)
-- * Messages from users or place creators. This is for client messages only.
--
-- ARGUMENTS:
-- Label: The message
-- Width: Text and background width (pixels) -- This should be removed when textWidth is added to Lua
-- Time: Seconds before hiding itself (If 0, it never hides)
--
-- USAGE:
local topHint = script.Parent.topHint -- path to topHint ScreenGui
topHint.Add.Label.Value = &quot;Press D to return to main menu.&quot;
topHint.Add.Width.Value = 290
topHint.Add.Time.Value = 7
topHint.Add.Disabled = true -- flip it off then on, in case it&apos;s currently running.
topHint.Add.Disabled = false
--
-- TO HIDE MANUALLY:
topHint.Delete.Disabled = false
-- Clicking the message also hides it.</ProtectedString>
</Properties>
</Item>
</Item>
</Item>
</roblox>