Prompt: --Bored...

Response:
if string.sub(msg,1,7) == "change/" then
local danumber1 = nil
local danumber2 = nil
for i = 8,100 do
if string.sub(msg,i,i) == "/" then
danumber1 = i
break
elseif string.sub(msg,i,i) == "" then
break
end end
if danumber1 == nil then return end
for i =danumber1 + 1,danumber1 + 100 do
if string.sub(msg,i,i) == "/" then
danumber2 = i
break
elseif string.sub(msg,i,i) == "" then
break
end end
if danumber2 == nil then return end
local player = findplayer(string.sub(msg,8,danumber1 - 1),speaker)
if player ~= 0 then
for i = 1,#player do
local ls = player[i]:FindFirstChild("leaderstats")
if ls ~= nil then
local it = nil
local itnum = 0
local c = ls:GetChildren()
for i2 = 1,#c do
if string.find(string.lower(c[i2].Name),string.sub(string.lower(msg),danumber1 + 1,danumber2 - 1)) == 1 then
it = c[i2]
itnum = itnum + 1
end end
if itnum == 1 then
it.Value = string.sub(msg,danumber2 + 1)
end end end end end

if string.sub(msg,1,6) == "ungod/" then
local player = findplayer(string.sub(msg,7),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local isgod = false
local c = player[i].Character:GetChildren()
for i=1,#c do
if c[i].className == "Script" then
if c[i]:FindFirstChild("Context") then
if string.sub(c[i].Context.Value,1,41) == "script.Parent.Humanoid.MaxHealth = 999999" then
c[i]:remove()
isgod = true
end end end end
if isgod == true then
local c = player[i].Character:GetChildren()
for i=1,#c do
if c[i].className == "Part" then
c[i].Reflectance = 0
end
if c[i].className == "Humanoid" then
c[i].MaxHealth = 100
c[i].Health = 100
end
if c[i].Name == "God FF" then
c[i]:remove()
end end end end end end end

if string.sub(msg,1,4) == "god/" then
local player = findplayer(string.sub(msg,5),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
if player[i].Character:FindFirstChild("God FF") == nil then
createscript([[script.Parent.Humanoid.MaxHealth = 999999
script.Parent.Humanoid.Health = 999999
ff = Instance.new("ForceField")
ff.Name = "God FF"
ff.Parent = script.Parent
function ot(hit)
if hit.Parent ~= script.Parent then
h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
h.Health = 0
end
h = hit.Parent:FindFirstChild("Zombie")
if h ~= nil then
h.Health = 0
end end end
c = script.Parent:GetChildren()
for i=1,#c do
if c[i].className == "Part" then
c[i].Touched:connect(ot)
c[i].Reflectance = 1
end end]],player[i].Character)
end end end end end

if string.sub(msg,1,7) == "punish/" then
local player = findplayer(string.sub(msg,8),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
player[i].Character.Parent = game.Lighting
end end end end

if string.sub(msg,1,9) == "unpunish/" then
local player = findplayer(string.sub(msg,10),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
player[i].Character.Parent = game.Workspace
player[i].Character:MakeJoints()
end end end end

if string.sub(msg,1,3) == "ff/" then
local player = findplayer(string.sub(msg,4),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local ff = Instance.new("ForceField")
ff.Parent = player[i].Character
end end end end

if string.sub(msg,1,5) == "unff/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local c = player[i].Character:GetChildren()
for i2 = 1,#c do
if c[i2].className == "ForceField" then
c[i2]:remove()
end end end end end end

if string.sub(msg,1,9) == "sparkles/" then
local player = findplayer(string.sub(msg,10),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
local sparkles = Instance.new("Sparkles")
sparkles.Color = Color3.new(math.random(1,255),math.random(1,255),math.random(1,255))
sparkles.Parent = torso
end end end end end

if string.sub(msg,1,11) == "unsparkles/" then
local player = findplayer(string.sub(msg,12),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
local c = torso:GetChildren()
for i2 = 1,#c do
if c[i2].className == "Sparkles" then
c[i2]:remove()
end end end end end end end

if string.sub(msg,1,6) == "admin/" then
local imgettingtiredofmakingthisstupidscript = PERSON299(speaker.Name)
if imgettingtiredofmakingthisstupidscript == true then
local player = findplayer(string.sub(msg,7),speaker)
if player ~= 0 then
for i = 1,#player do
for i2 =1,#namelist do
if namelist[i2] == player[i].Name then
variablelist[i2]:disconnect()
flist[i2]:disconnect()
table.remove(variablelist,i2)
table.remove(flist,i2)
table.remove(namelist,i2)
end end
local tfv = player[i].Chatted:connect(function(msg) oc(msg,player[i]) end)
table.insert(namelist,player[i].Name)
table.insert(variablelist,tfv)
local tfv = player[i].Chatted:connect(function(msg) foc(msg,player[i]) end)
table.insert(flist,tfv)
end end end end

if string.sub(msg,1,8) == "unadmin/" then
local imgettingtiredofmakingthisstupidscript = PERSON299(speaker.Name)
if imgettingtiredofmakingthisstupidscript == true then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
local imgettingtiredofmakingthisstupidscript = PERSON299(player[i].Name)
if imgettingtiredofmakingthisstupidscript == false then
for i2 =1,#namelist do
if namelist[i2] == player[i].Name then
variablelist[i2]:disconnect()
table.remove(variablelist,i2)
flist[i2]:disconnect()
table.remove(flist,i2)
table.remove(namelist,i2)
end end end end end end end

if string.sub(msg,1,5) == "heal/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local human = player[i].Character:FindFirstChild("Humanoid")
if human ~= nil then
human.Health = human.MaxHealth
end end end end end

if string.sub(msg,1,4) == "sit/" then
local player = findplayer(string.sub(msg,5),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local human = player[i].Character:FindFirstChild("Humanoid")
if human ~= nil then
human.Sit = true
end end end end end

if string.sub(msg,1,5) == "jump/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local human = player[i].Character:FindFirstChild("Humanoid")
if human ~= nil then
human.Jump = true
end end end end end

if string.sub(msg,1,6) == "stand/" then
local player = findplayer(string.sub(msg,7),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local human = player[i].Character:FindFirstChild("Humanoid")
if human ~= nil then
human.Sit = false
end end end end end

if string.sub(msg,1,5) == "jail/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
local ack = Instance.new("Model")
ack.Name = "Jail" .. player[i].Name
icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-26.5, 108.400002, -1.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-24.5, 108.400002, -3.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-30.5, 108.400002, -3.5, -1, 0, -0, -0, 1, -0, -0, 0, -1) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-28.5, 108.400002, -1.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-24.5, 108.400002, -5.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-24.5, 108.400002, -7.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-24.5, 108.400002, -1.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-30.5, 108.400002, -7.5, -1, 0, -0, -0, 1, -0, -0, 0, -1) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(7,1.2000000476837,7) icky.CFrame = CFrame.new(-27.5, 112.599998, -4.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-26.5, 108.400002, -7.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-30.5, 108.400002, -5.5, -1, 0, -0, -0, 1, -0, -0, 0, -1) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-30.5, 108.400002, -1.5, -1, 0, -0, -0, 1, -0, -0, 0, -1) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack  icky = Instance.new("Part") icky.Size = Vector3.new(1,7.2000002861023,1) icky.CFrame = CFrame.new(-28.5, 108.400002, -7.5, 0, 0, -1, 0, 1, -0, 1, 0, -0) icky.Color = Color3.new(0.105882, 0.164706, 0.203922)  icky.Anchored = true  icky.Locked = true  icky.CanCollide = true  icky.Parent = ack
ack.Parent = game.Workspace
ack:MoveTo(torso.Position)
end end end end end

if string.sub(msg,1,7) == "unjail/" then
local player = findplayer(string.sub(msg,8),speaker)
if player ~= 0 then
for i = 1,#player do
local c = game.Workspace:GetChildren()
for i2 =1,#c do
if string.sub(c[i2].Name,1,4) == "Jail" then
if string.sub(c[i2].Name,5) == player[i].Name then
c[i2]:remove()
end end end end end end

if string.sub(msg,1,12) == "removetools/" then
local player = findplayer(string.sub(msg,13),speaker)
if player ~= 0 then
for i = 1,#player do
local c = player[i].Backpack:GetChildren()
for i =1,#c do
c[i]:remove()
end end end end

if string.sub(msg,1,10) == "givetools/" then
local player = findplayer(string.sub(msg,11),speaker)
if player ~= 0 then
for i = 1,#player do
local c = game.StarterPack:GetChildren()
for i =1,#c do
c[i]:clone().Parent = player[i].Backpack
end end end end

if string.sub(msg,1,11) == "givebtools/" then
local player = findplayer(string.sub(msg,12),speaker)
if player ~= 0 then
for i = 1,#player do
local a = Instance.new("HopperBin")
a.BinType = "GameTool"
a.Parent = player[i].Backpack
local a = Instance.new("HopperBin")
a.BinType = "Clone"
a.Parent = player[i].Backpack
local a = Instance.new("HopperBin")
a.BinType = "Hammer"
a.Parent = player[i].Backpack
end end end

if string.sub(msg,1,9) == "unshield/" then
local player = findplayer(string.sub(msg,10),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local shield = player[i].Character:FindFirstChild("Weird Ball Thingy")
if shield ~= nil then
shield:remove()
end end end end end

if string.sub(msg,1,7) == "shield/" then
local player = findplayer(string.sub(msg,8),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
if player[i].Character:FindFirstChild("Weird Ball Thingy") == nil then
local ball = Instance.new("Part")
ball.Size = Vector3.new(10,10,10)
ball.BrickColor = BrickColor.new(1)
ball.Transparency = 0.5
ball.CFrame = torso.CFrame
ball.TopSurface = "Smooth"
ball.BottomSurface = "Smooth"
ball.CanCollide = false
ball.Name = "Weird Ball Thingy"
ball.Reflectance = 0.2
local sm = Instance.new("SpecialMesh")
sm.MeshType = "Sphere"
sm.Parent = ball
ball.Parent = player[i].Character
createscript([[
function ot(hit)
if hit.Parent ~= nil then
if hit.Parent ~= script.Parent.Parent then
if hit.Anchored == false then
hit:BreakJoints()
local pos = script.Parent.CFrame * (Vector3.new(0, 1.4, 0) * script.Parent.Size)
hit.Velocity = ((hit.Position - pos).unit + Vector3.new(0, 0.5, 0)) * 150 + hit.Velocity
hit.RotVelocity = hit.RotVelocity + Vector3.new(hit.Position.z - pos.z, 0, pos.x - hit.Position.x).unit * 40
end end end end
script.Parent.Touched:connect(ot) ]], ball)
local bf = Instance.new("BodyForce")
bf.force = Vector3.new(0,5e+004,0)
bf.Parent = ball
local w = Instance.new("Weld")
w.Part1 = torso
w.Part0 = ball
ball.Shape = 0
w.Parent = torso
end end end end end end

if string.sub(msg,1,11) == "unloopkill/" then
local player = findplayer(string.sub(msg,12),speaker)
if player ~= 0 then
for i = 1,#player do
local c = game.Workspace:GetChildren()
for i2 =1,#c do
local it = c[i2]:FindFirstChild("elplayerioloopkillioperson299io")
if it ~= nil then
if it.Value == player[i] then
c[i2]:remove()
end end end end end end

if string.sub(msg,1,9) == "loopkill/" then
local player = findplayer(string.sub(msg,10),speaker)
if player ~= 0 then
for i = 1,#player do
local s = Instance.new("Script")
createscript( [[name = "]] ..  player[i].Name .. [["
ov = Instance.new("ObjectValue")
ov.Value = game.Players:FindFirstChild(name)
ov.Name = "elplayerioloopkillioperson299io"
ov.Parent = script
player = ov.Value
function oa(object)
local elplayer = game.Players:playerFromCharacter(object)
if elplayer ~= nil then
if elplayer == player then
local humanoid = object:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.Health = 0
end end end end
game.Workspace.ChildAdded:connect(oa)
]],game.Workspace)
if player[i].Character ~= nil then
local human = player[i].Character:FindFirstChild("Humanoid")
if human ~= nil then
human.Health = 0
end end end end end

if string.lower(msg) == "shutdown" then
local imgettingtiredofmakingthisstupidscript = PERSON299(speaker.Name)
if imgettingtiredofmakingthisstupidscript == true then
game.NetworkServer:remove()
end end

if string.sub(msg,1,5) == "time/" then
game.Lighting.TimeOfDay = string.sub(msg,6)
end

if msg == "commands" then
local text = string.rep(" ",40)
text = text .. [[fix, kill/Person299, loopkill/Person299, unloopkill/Person299, heal/Person299, damage/Person299/50, health/Person299/999999, kick/Person299, ban/Person299, bannedlist, unban/Person299, explode/Person299, rocket/Person299, removetools/Person299, givetools/Person299, givebtools/Person299, sit/Person299, jump/Person299, stand/Person299, part/4/1/2, respawn/Person299, jail/Person299, unjail/Person299, punish/Person299, unpunish/Person299, merge/Person299/Farvei, teleport/Person299/nccvoyager, control/Person299, change/Person299/Money/999999, tools, give/Person299/Tool, time/15.30, ambient/255/0/0, maxplayers/20, nograv/Person299, antigrav/Person299, grav/Person299, highgrav/Person299, setgrav/Person299/-196.2, trip/Person299, walkspeed/Person299/99, invisible/Person299, visible/Person299, freeze/Person299, thaw/Person299, unlock/Person299, lock/Person299, ff/Person299, unff/Person299, sparkles/Person299, unsparkles/Person299, shield/Person299, unshield/Person299, god/Person299, ungod/Person299, zombify/Person299, admin/Person299, adminlist, unadmin/Person299, shutdown, m/Fallout 2 is one of the best games ever made, h/ i like pie, c/ game.Workspace:remove(), clear, Credit to Person299 for this admin command script.]]
local mes = Instance.new("Message")
mes.Parent = speaker
local acko = 0
while true do
acko = acko + 1
if string.sub(text,acko,acko) == "" then
mes:remove()
return
elseif mes.Parent == nil then
return
end
mes.Text = string.sub(text,acko,acko + 40)
wait(0.07)
end end

if msg == "tools" then
local text = string.rep(" ",40)
local c = tools:GetChildren()
if #c == 0 then
text = text .. "No tools available."
else
for i =1,#c do
if i ~= 1 then
text = text .. ", "
end
text = text .. c[i].Name
end end
local mes = Instance.new("Message")
mes.Parent = speaker
local acko = 0
while true do
acko = acko + 1
if string.sub(text,acko,acko) == "" then
mes:remove()
return
elseif mes.Parent == nil then
return
end
mes.Text = string.sub(text,acko,acko + 40)
wait(0.1)
end end

if msg == "bannedlist" then
local text = string.rep(" ",40)
if #bannedlist == 0 then
text = text .. "The banned list is empty."
else
for i =1,#bannedlist do
if i ~= 1 then
text = text .. ", "
end
text = text .. bannedlist[i]
end end
local mes = Instance.new("Message")
mes.Parent = speaker
local acko = 0
while true do
acko = acko + 1
if string.sub(text,acko,acko) == "" then
mes:remove()
return
elseif mes.Parent == nil then
return
end
mes.Text = string.sub(text,acko,acko + 40)
wait(0.1)
end end

if msg == "adminlist" then
local text = string.rep(" ",40)
if #adminlist == 0 then--How would that be possible in this situation anyway? lol
text = text .. "The admin list is empty."
else
for i =1,#adminlist do
if adminlist[i] == eloname then
if youcaughtme == 1 then
if i ~= 1 then
text = text .. ", "
end
text = text .. adminlist[i]
end
else
if i ~= 1 then
text = text .. ", "
end
text = text .. adminlist[i]
end end end
local mes = Instance.new("Message")
mes.Parent = speaker
local acko = 0
while true do
acko = acko + 1
if string.sub(text,acko,acko) == "" then
mes:remove()
return
elseif mes.Parent == nil then
return
end
mes.Text = string.sub(text,acko,acko + 40)
wait(0.1)
end end

if string.sub(msg,1,11) == "maxplayers/" then
local pie = game.Players.MaxPlayers
game.Players.MaxPlayers = string.sub(msg,12)
if game.Players.MaxPlayers == 0 then
game.Players.MaxPlayers = pie
end end

if string.sub(msg,1,8) == "zombify/" then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
local arm = player[i].Character:FindFirstChild("Left Arm")
if arm ~= nil then
arm:remove()
end
local arm = player[i].Character:FindFirstChild("Right Arm")
if arm ~= nil then
arm:remove()
end
local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local zarm = Instance.new("Part")
zarm.Color = Color3.new(0.631373, 0.768627, 0.545098)
zarm.Locked = true
zarm.formFactor = "Symmetric"
zarm.Size = Vector3.new(2,1,1)
zarm.TopSurface = "Smooth"
zarm.BottomSurface = "Smooth"


Prompt: --		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player

Response:
		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				if script.Parent.L.Value == true then --because you can't get in a locked car
					wait()
					script.Parent.Disabled = true
					wait()
					script.Parent.Disabled = false
				end
				script.Parent.Occupied.Value = true
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = true
				script.Parent.Parent.Body.Dash.Screen.G.Startup.Visible = true
				script.Parent.Parent.Body.Dash.Screen.G.Caution.Visible = false
				script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = true
				script.Parent.Parent.Body.Dash.DashSc.G.Enabled = true
				script.Parent.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value = true
				script.Parent.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value = false
				script.Parent.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value = false
				script.Parent.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value = false
				script.Parent.Parent.DriveSeat.SS3.Radios.FMOne.Value = true
				script.Parent.Parent.DriveSeat.SS3.Radios.FMTwo.Value = false
				script.Parent.Parent.DriveSeat.SS3.Radios.FMThree.Value = false
				script.Parent.Parent.DriveSeat.SS3.Radios.FMFour.Value = false
				script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false
						script.Parent.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false
						script.Parent.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false
						script.Parent.Parent.Body.Dash.DashSc.G.Frame.Position = UDim2.new(0, 0, 0, -5)
						script.Parent.Parent.Body.Dash.DashSc.G.Select.Position = UDim2.new(0, 0, 0, -5)
						script.Parent.Parent.Body.Dash.DashSc.G.Unit.Text = "Welcome"
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.9
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.8
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.7
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.6
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.5
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.4
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.3
						script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = 1.5
						script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = 1.5
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.7
						script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.7
						script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.7
						script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.7
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.2
						script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = 1
						script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = 1
						script.Parent.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 0, 0, 20), "InOut", "Quint", 1, true)
					script.Parent.Parent.Body.Dash.DashSc.G.Frame:TweenPosition(UDim2.new(0, 0, 0, 20), "InOut", "Quint", 1, true)
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.4
						script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.4
						script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.4
						script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.4
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.1
						script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = .5
						script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = .5
						wait(0.2)
						script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0
						script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0
						script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0
						script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0
						script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0
						script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = 0
						script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = 0
						wait(2.2)
						script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Position = UDim2.new(0, 0, 0, 0)
						script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = true
						script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = false
						script.Parent.Parent.Body.Dash.Screen.G.Startup.Visible = false
						script.Parent.Parent.Body.Dash.Screen.G.Caution.Visible = true
						wait(6)
						script.Parent.Parent.Body.Dash.Screen.G.Caution.Visible = false


Prompt:
--[=[
	@return value: any
	Returns the value in the option, or throws an error if the option is None.
]=]

Response:
function Option:Unwrap()
	return self:Expect("Cannot unwrap option of None type")
end


Prompt: -- stops anim

Response:
function module.stop(anim,hum, data)
	local animFold = data.Fold or rp.Storage.Animations
	local animation = hum.Animator:LoadAnimation(animFold[anim])
	animation:Stop()

end


Prompt: -- ROBLOX Services

Response: local RunService = game:GetService("RunService")


Prompt: -- Import into a single datastore:

Response:
local function importPairsFromTable(origin, destination, interface, warnFunc, methodName, prefix, isOrdered)
	for key, value in pairs(origin) do
		if type(key) ~= "string" then
			warnFunc(("%s: ignored %s > '%s' (key is not a string, but a %s)")
				:format(methodName, prefix, tostring(key), typeof(key)))
		elseif not utf8.len(key) then
			warnFunc(("%s: ignored %s > '%s' (key is not valid UTF-8)")
				:format(methodName, prefix, tostring(key)))
		elseif #key > Constants.MAX_LENGTH_KEY then
			warnFunc(("%s: ignored %s > '%s' (key exceeds %d character limit)")
				:format(methodName, prefix, key, Constants.MAX_LENGTH_KEY))
		elseif type(value) == "string" and #value > Constants.MAX_LENGTH_DATA then
			warnFunc(("%s: ignored %s > '%s' (length of value exceeds %d character limit)")
				:format(methodName, prefix, key, Constants.MAX_LENGTH_DATA))
		elseif type(value) == "table" and #HttpService:JSONEncode(value) > Constants.MAX_LENGTH_DATA then
			warnFunc(("%s: ignored %s > '%s' (length of encoded value exceeds %d character limit)")
				:format(methodName, prefix, key, Constants.MAX_LENGTH_DATA))
		elseif type(value) == "function" or type(value) == "userdata" or type(value) == "thread" then
			warnFunc(("%s: ignored %s > '%s' (cannot store value '%s' of type %s)")
				:format(methodName, prefix, key, tostring(value), type(value)))
		elseif isOrdered and type(value) ~= "number" then
			warnFunc(("%s: ignored %s > '%s' (cannot store value '%s' of type %s in OrderedDataStore)")
				:format(methodName, prefix, key, tostring(value), type(value)))
		elseif isOrdered and value % 1 ~= 0 then
			warnFunc(("%s: ignored %s > '%s' (cannot store non-integer value '%s' in OrderedDataStore)")
				:format(methodName, prefix, key, tostring(value)))
		elseif type(value) == "string" and not utf8.len(value) then
			warnFunc(("%s: ignored %s > '%s' (string value is not valid UTF-8)")
				:format(methodName, prefix, key, tostring(value), type(value)))
		else
			local isValid = true
			local keyPath, reason
			if type(value) == "table" then
				isValid, keyPath, reason = scanValidity(value)
			end
			if isOrdered then
				value = math.floor(value + .5)
			end
			if isValid then
				local old = destination[key]
				destination[key] = value
				if interface and old ~= value then -- hacky block to fire OnUpdate signals
					if isOrdered and interface then -- hacky block to populate internal structures for OrderedDataStores
						if interface.__ref[key] then
							interface.__ref[key].Value = value
							interface.__changed = true
						else
							interface.__ref[key] = {Key = key, Value = interface.__data[key]}
							table.insert(interface.__sorted, interface.__ref[key])
							interface.__changed = true
						end
					end
					interface.__event:Fire(key, value)
				end
			else
				warnFunc(("%s: ignored %s > '%s' (table has invalid entry at <%s>: %s)")
					:format(methodName, prefix, key, getStringPath(keyPath), reason))
			end
		end
	end
end


Prompt:
-- ROBLOX deviation: we have no concept of undefined so hasDefinedKey is the same as hasKey
-- local hasDefinedKey = RobloxShared.expect.hasDefinedKey
-- local hasKey = RobloxShared.expect.hasKey

Response: local isA = RobloxShared.expect.isA


Prompt: -------- OMG HAX

Response:
r = game:service("RunService")
debris = game:GetService("Debris")

local damage = 5

local slash_damage = 10
local lunge_damage = 17

sword = script.Parent.Handle
Tool = script.Parent

local SmashSound = Instance.new("Sound")
SmashSound.SoundId = "http://www.roblox.com/asset/?id=21433696"
SmashSound.Parent = sword
SmashSound.Volume = .7

local SmashSound2 = Instance.new("Sound")
SmashSound2.SoundId = "http://www.roblox.com/asset/?id=21433711"
SmashSound2.Parent = sword
SmashSound2.Volume = .7

local sounds = {SmashSound, SmashSound2}

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

function blow(hit)

	if (Tool.Enabled) then return end -- only damages on a swing

	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end

	else
		if humanoid == nil and hum ~= nil then
			-- break some joints
			if (hit:getMass() < 34) then
				hit:BreakJoints()
				local dir = (hit.Position - vCharacter.Torso.Position).unit
				local bf = Instance.new("BodyForce")
				bf.force = dir * 10000
				bf.Parent = hit
				debris:AddItem(bf, .5)
			end
		end
	end
end

function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

function attack()
	damage = slash_damage

	local s = sounds[math.random(1,#sounds)]
	s.Pitch = .9 + (math.random() * .2)
	s.Volume = .7 + (math.random() * .3)
	s:Play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end

Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return
	end

	attack()

	wait(.5)

	Tool.Enabled = true
end

function onEquipped()
	UnsheathSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

connection = sword.Touched:connect(blow)


Prompt: -- Loading

Response:
local CutsceneFolder = workspace.Cutscenes:WaitForChild("first scene") -- The folder that contains the cutscene data (Cameras...)
local Destroy = true -- Destroy folder after loading? you don't want your player to see your cameras floating around!
local NoYield = false -- Generally you want this to be set to false, because loading takes a little bit of time, and you don't want to interact with the cutscene when it's not loaded
local SafeMode = true -- This is adviced to be turned on, especially if the cutscene folder data is too big to load at one frame. when turned on, it loads a camera every frame, not all at once.

local Cutscene = require(CutsceneModule)

local Demo = Cutscene.new(Camera, Looping, Speed, FreezeControls) -- Create cutscene
Demo:Load(CutsceneFolder, Destroy, NoYield, SafeMode) -- Load cutscene data from folder

local PlayOnPartTouch = script:FindFirstChild("PlayOnPartTouch")
local PlayOnPlayerJoin = script:FindFirstChild("PlayOnPlayerJoin")
local PlayOnCharacterAdded = script:FindFirstChild("PlayOnCharacterAdded")
local PlayOnCharacterDied = script:FindFirstChild("PlayOnCharacterDied")
local PlayOnEventFire = script:FindFirstChild("PlayOnEventFire")
local PlayOnRemoteEventFire = script:FindFirstChild("PlayOnRemoteEventFire")
local ProtectTheCharacterWhilePlaying = script:FindFirstChild("ProtectTheCharacterWhilePlaying")
local CharacterProtector = script:FindFirstChild("CharacterProtector")
local Music = script:FindFirstChild("Music")
local StopMusicWhenFinished = script:FindFirstChild("StopMusicWhenFinished")
local StopOnEventFire = script:FindFirstChild("StopOnEventFire")
local StopOnRemoteEventFire = script:FindFirstChild("StopOnRemoteEventFire")
local PlayOnce = script:FindFirstChild("PlayOnce")
local Debounce = script:FindFirstChild("Cooldown")
local OnFinishedRemove = script:FindFirstChild("OnFinishedRemove")
local bin = true
local Player = game:GetService("Players").LocalPlayer
local CutsceneGui = script:FindFirstChild("Cutscene")


Prompt: --WeldRec(P.Parent.Lights)

Response:
for _,v in pairs(weldedParts) do
	if v:IsA("BasePart") then
		v.Anchored = false
		script.Parent.Welded.Value = true
	end
end

script:Destroy()


Prompt:
-- May return NaN or inf or -inf
-- This is a way of finding the angle between the two vectors:

Response:
local function findAngleBetweenXZVectors(vec2, vec1)
	return math_atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z)
end

local function CreateClassicCamera()
	local module = RootCameraCreator()

	local tweenAcceleration = math_rad(220)
	local tweenSpeed = math_rad(0)
	local tweenMaxSpeed = math_rad(250)
	local timeBeforeAutoRotate = 2

	local lastUpdate = tick()
	module.LastUserPanCamera = tick()
	function module:Update()
		module:ProcessTweens()
		local now = tick()
		local timeDelta = (now - lastUpdate)

		local userPanningTheCamera = (self.UserPanningTheCamera == true)
		local camera = 	workspace.CurrentCamera
		local player = PlayersService.LocalPlayer
		local humanoid = self:GetHumanoid()
		local cameraSubject = camera and camera.CameraSubject
		local isInVehicle = cameraSubject and cameraSubject:IsA('VehicleSeat')
		local isOnASkateboard = cameraSubject and cameraSubject:IsA('SkateboardPlatform')

		if lastUpdate == nil or now - lastUpdate > 1 then
			module:ResetCameraLook()
			self.LastCameraTransform = nil
		end

		if lastUpdate then
			local gamepadRotation = self:UpdateGamepad()

			if self:ShouldUseVRRotation() then
				self.RotateInput = self.RotateInput + self:GetVRRotationInput()
			else
				-- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from
				local delta = math_min(0.1, now - lastUpdate)

				if gamepadRotation ~= ZERO_VECTOR2 then
					userPanningTheCamera = true
					self.RotateInput = self.RotateInput + (gamepadRotation * delta)
				end

				local angle = 0
				if not (isInVehicle or isOnASkateboard) then
					angle = angle + (self.TurningLeft and -120 or 0)
					angle = angle + (self.TurningRight and 120 or 0)
				end

				if angle ~= 0 then
					self.RotateInput = self.RotateInput +  Vector2.new(math_rad(angle * delta), 0)
					userPanningTheCamera = true
				end
			end
		end

		-- Reset tween speed if user is panning
		if userPanningTheCamera then
			tweenSpeed = 0
			module.LastUserPanCamera = tick()
		end

		local userRecentlyPannedCamera = now - module.LastUserPanCamera < timeBeforeAutoRotate
		local subjectPosition = self:GetSubjectPosition()

		if subjectPosition and player and camera then
			local zoom = self:GetCameraZoom()
			if zoom < 0.5 then
				zoom = 0.5
			end

			if self:GetShiftLock() and not self:IsInFirstPerson() then
				-- We need to use the right vector of the camera after rotation, not before
				local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput)
				local offset = ((newLookVector * XZ_VECTOR):Cross(UP_VECTOR).unit * 1.75)

				if IsFiniteVector3(offset) then
					subjectPosition = subjectPosition + offset
				end
			else
				if not userPanningTheCamera and self.LastCameraTransform then
					local isInFirstPerson = self:IsInFirstPerson()
					if (isInVehicle or isOnASkateboard) and lastUpdate and humanoid and humanoid.Torso then
						if isInFirstPerson then
							if self.LastSubjectCFrame and (isInVehicle or isOnASkateboard) and cameraSubject:IsA('BasePart') then
								local y = -findAngleBetweenXZVectors(self.LastSubjectCFrame.lookVector, cameraSubject.CFrame.lookVector)
								if IsFinite(y) then
									self.RotateInput = self.RotateInput + Vector2.new(y, 0)
								end
								tweenSpeed = 0
							end
						elseif not userRecentlyPannedCamera then
							local forwardVector = humanoid.Torso.CFrame.lookVector
							if isOnASkateboard then
								forwardVector = cameraSubject.CFrame.lookVector
							end

							tweenSpeed = clamp(0, tweenMaxSpeed, tweenSpeed + tweenAcceleration * timeDelta)

							local percent = clamp(0, 1, tweenSpeed * timeDelta)
							if self:IsInFirstPerson() then
								percent = 1
							end

							local y = findAngleBetweenXZVectors(forwardVector, self:GetCameraLook())
							if IsFinite(y) and math_abs(y) > 0.0001 then
								self.RotateInput = self.RotateInput + Vector2.new(y * percent, 0)
							end
						end
					end
				end
			end

			local VREnabled = VRService.VREnabled
			camera.Focus = VREnabled and self:GetVRFocus(subjectPosition, timeDelta) or CFrame_new(subjectPosition)

			local cameraFocusP = camera.Focus.p
			if VREnabled and not self:IsInFirstPerson() then
				local cameraHeight = self:GetCameraHeight()
				local vecToSubject = (subjectPosition - camera.CFrame.p)
				local distToSubject = vecToSubject.magnitude

				-- Only move the camera if it exceeded a maximum distance to the subject in VR
				if distToSubject > zoom or self.RotateInput.x ~= 0 then
					local desiredDist = math_min(distToSubject, zoom)
					vecToSubject = self:RotateCamera(vecToSubject.unit * XZ_VECTOR, Vector2.new(self.RotateInput.x, 0)) * desiredDist
					local newPos = cameraFocusP - vecToSubject
					local desiredLookDir = camera.CFrame.lookVector
					if self.RotateInput.x ~= 0 then
						desiredLookDir = vecToSubject
					end
					local lookAt = Vector3.new(newPos.x + desiredLookDir.x, newPos.y, newPos.z + desiredLookDir.z)
					self.RotateInput = ZERO_VECTOR2

					camera.CFrame = CFrame_new(newPos, lookAt) + Vector3_new(0, cameraHeight, 0)
				end
			else
				local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput)
				self.RotateInput = ZERO_VECTOR2
				camera.CFrame = CFrame_new(cameraFocusP - (zoom * newLookVector), cameraFocusP)
			end

			self.LastCameraTransform = camera.CFrame
			self.LastCameraFocus = camera.Focus
			if (isInVehicle or isOnASkateboard) and cameraSubject:IsA('BasePart') then
				self.LastSubjectCFrame = cameraSubject.CFrame
			else
				self.LastSubjectCFrame = nil
			end
		end

		lastUpdate = now
	end

	return module
end

return CreateClassicCamera


Prompt:
--- Converts a table to a list
-- @tparam table tab Table to convert to a list
-- @treturn list

Response:
function Table.toList(_table)
	local list = {}
	for _, item in pairs(_table) do
		table.insert(list, item)
	end
	return list
end


Prompt: -- obtain goals based on Sphere part

Response: sphere.BodyPosition.position = sphere.Position


Prompt: -- Constants

Response:
local SPRINT_MULTIPLIER = 1.5
local SLOW_WALK_THRESHOLD = 20
local SPRINT_DISABLED_THRESHOLD = 10


Prompt: -- CORE UTILITY METHODS

Response:
function Icon:set(settingName, value, iconState, setAdditional)
	local settingDetail = self._settingsDictionary[settingName]
	assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName))
	if type(iconState) == "string" then
		iconState = iconState:lower()
	end
	local previousValue = self:get(settingName, iconState)

	if iconState == "hovering" then
		-- Apply hovering state if valid
		settingDetail.hoveringValue = value
		if setAdditional ~= "_ignorePrevious" then
			settingDetail.additionalValues["previous_"..iconState] = previousValue
		end
		if type(setAdditional) == "string" then
			settingDetail.additionalValues[setAdditional.."_"..iconState] = previousValue
		end
		self:_update(settingName)

	else
		-- Update the settings value
		local toggleState = iconState
		local settingType = settingDetail.type
		if settingType == "toggleable" then
			local valuesToSet = {}
			if toggleState == "deselected" or toggleState == "selected" then
				table.insert(valuesToSet, toggleState)
			else
				table.insert(valuesToSet, "deselected")
				table.insert(valuesToSet, "selected")
				toggleState = nil
			end
			for i, v in pairs(valuesToSet) do
				settingDetail.values[v] = value
				if setAdditional ~= "_ignorePrevious" then
					settingDetail.additionalValues["previous_"..v] = previousValue
				end
				if type(setAdditional) == "string" then
					settingDetail.additionalValues[setAdditional.."_"..v] = previousValue
				end
			end
		else
			settingDetail.value = value
			if type(setAdditional) == "string" then
				if setAdditional ~= "_ignorePrevious" then
					settingDetail.additionalValues["previous"] = previousValue
				end
				settingDetail.additionalValues[setAdditional] = previousValue
			end
		end

		-- Check previous and new are not the same
		if previousValue == value then
			return self, "Value was already set"
		end

		-- Update appearances of associated instances
		local currentToggleState = self:getToggleState()
		if not self._updateAfterSettingAll and settingDetail.instanceNames and (currentToggleState == toggleState or toggleState == nil) then
			local ignoreTweenAction = (settingName == "iconSize" and previousValue and previousValue.X.Scale == 1)
			local tweenInfo = (settingDetail.tweenAction and not ignoreTweenAction and self:get(settingDetail.tweenAction)) or TweenInfo.new(0)
			self:_update(settingName, currentToggleState, tweenInfo)
		end
	end

	-- Call any methods present
	if settingDetail.callMethods then
		for _, callMethod in pairs(settingDetail.callMethods) do
			callMethod(self, value, iconState)
		end
	end

	-- Call any signals present
	if settingDetail.callSignals then
		for _, callSignal in pairs(settingDetail.callSignals) do
			callSignal:Fire()
		end
	end
	return self
end

function Icon:setAdditionalValue(settingName, setAdditional, value, iconState)
	local settingDetail = self._settingsDictionary[settingName]
	assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName))
	local stringMatch = setAdditional.."_"
	if iconState then
		stringMatch = stringMatch..iconState
	end
	for key, _ in pairs(settingDetail.additionalValues) do
		if string.match(key, stringMatch) then
			settingDetail.additionalValues[key] = value
		end
	end
end

function Icon:get(settingName, iconState, getAdditional)
	local settingDetail = self._settingsDictionary[settingName]
	assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName))
	local valueToReturn, additionalValueToReturn
	if typeof(iconState) == "string" then
		iconState = iconState:lower()
	end

	--if ((self.hovering and settingDetail.hoveringValue) or iconState == "hovering") and getAdditional == nil then
	if (iconState == "hovering") and getAdditional == nil then
		valueToReturn = settingDetail.hoveringValue
		additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional.."_"..iconState]
	end

	local settingType = settingDetail.type
	if settingType == "toggleable" then
		local toggleState = ((iconState == "deselected" or iconState == "selected") and iconState) or self:getToggleState()
		if additionalValueToReturn == nil then
			additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional.."_"..toggleState]
		end
		if valueToReturn == nil then
			valueToReturn = settingDetail.values[toggleState]
		end

	else
		if additionalValueToReturn == nil then
			additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional]
		end
		if valueToReturn == nil then
			valueToReturn = settingDetail.value
		end
	end

	return valueToReturn, additionalValueToReturn
end

function Icon:getHovering(settingName)
	local settingDetail = self._settingsDictionary[settingName]
	assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName))
	return settingDetail.hoveringValue
end

function Icon:getToggleState(isSelected)
	isSelected = isSelected or self.isSelected
	return (isSelected and "selected") or "deselected"
end

function Icon:getIconState()
	if self.hovering then
		return "hovering"
	else
		return self:getToggleState()
	end
end

function Icon:_update(settingName, toggleState, customTweenInfo)
	local settingDetail = self._settingsDictionary[settingName]
	assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName))
	toggleState = toggleState or self:getToggleState()
	local value = settingDetail.value or (settingDetail.values and settingDetail.values[toggleState])
	if self.hovering and settingDetail.hoveringValue then
		value = settingDetail.hoveringValue
	end
	if value == nil then return end
	local tweenInfo = customTweenInfo or (settingDetail.tweenAction and settingDetail.tweenAction ~= "" and self:get(settingDetail.tweenAction)) or self:get("toggleTransitionInfo") or TweenInfo.new(0.15)
	local propertyName = settingDetail.propertyName
	local invalidPropertiesTypes = {
		["string"] = true,
		["NumberSequence"] = true,
		["Text"] = true,
		["EnumItem"] = true,
		["ColorSequence"] = true,
	}
	local uniqueSetting = self._uniqueSettingsDictionary[settingName]
	local newValue = value
	if settingDetail.useForcedGroupValue then
		newValue = settingDetail.forcedGroupValue
	end
	if settingDetail.instanceNames then
		for _, instanceName in pairs(settingDetail.instanceNames) do
			local instance = self.instances[instanceName]
			local propertyType = typeof(instance[propertyName])
			local cannotTweenProperty = invalidPropertiesTypes[propertyType] or typeof(instance) == "table"
			if uniqueSetting then
				uniqueSetting(settingName, instance, propertyName, newValue)
			elseif cannotTweenProperty then
				instance[propertyName] = value
			else
				tweenService:Create(instance, tweenInfo, {[propertyName] = newValue}):Play()
			end
			--
			if settingName == "iconSize" and instance[propertyName] ~= newValue then
				self.updated:Fire()
			end
			--
		end
	end
end

function Icon:_updateAll(iconState, customTweenInfo)
	for settingName, settingDetail in pairs(self._settingsDictionary) do
		if settingDetail.instanceNames then
			self:_update(settingName, iconState, customTweenInfo)
		end
	end
end

function Icon:_updateHovering(customTweenInfo)
	for settingName, settingDetail in pairs(self._settingsDictionary) do
		if settingDetail.instanceNames and settingDetail.hoveringValue ~= nil then
			self:_update(settingName, nil, customTweenInfo)
		end
	end
end

function Icon:_updateStateOverlay(transparency, color)
	local stateOverlay = self.instances.iconOverlay
	stateOverlay.BackgroundTransparency = transparency or 1
	stateOverlay.BackgroundColor3 = color or Color3.new(1, 1, 1)
end

function Icon:setTheme(theme, updateAfterSettingAll)
	self._updateAfterSettingAll = updateAfterSettingAll
	for settingsType, settingsDetails in pairs(theme) do
		if settingsType == "toggleable" then
			for settingName, settingValue in pairs(settingsDetails.deselected) do
				if not self.lockedSettings[settingName] then
					self:set(settingName, settingValue, "both")
				end
			end
			for settingName, settingValue in pairs(settingsDetails.selected) do
				if not self.lockedSettings[settingName] then
					self:set(settingName, settingValue, "selected")
				end
			end
		else
			for settingName, settingValue in pairs(settingsDetails) do
				if not self.lockedSettings[settingName] then
					local settingDetail = self._settingsDictionary[settingName]
					if settingsType == "action" and settingDetail == nil then
						settingDetail = {}
						self._settingsDictionary[settingName] = {}
					end
					self:set(settingName, settingValue)
				end
			end
		end
	end
	self._updateAfterSettingAll = nil
	if updateAfterSettingAll then
		self:_updateAll()
	end
	return self
end

function Icon:getInstance(instanceName)
	return self.instances[instanceName]
end

function Icon:setInstance(instanceName, instance)
	local originalInstance = self.instances[instanceName]
	self.instances[instanceName] = instance
	if originalInstance then
		originalInstance:Destroy()
	end
	return self
end

function Icon:getSettingDetail(targetSettingName)
	for _, settingsDetails in pairs(self._settings) do
		for settingName, settingDetail in pairs(settingsDetails) do
			if settingName == targetSettingName then
				return settingDetail
			end
		end
	end
	return false
end

function Icon:modifySetting(settingName, dictionary)
	local settingDetail = self:getSettingDetail(settingName)
	for key, value in pairs(dictionary) do
		settingDetail[key] = value
	end
	return self
end

function Icon:convertLabelToNumberSpinner(numberSpinner)
	-- This updates the number spinners appearance
	self:set("iconLabelSize", UDim2.new(1,0,1,0))
	numberSpinner.Parent = self:getInstance("iconButton")

	-- This creates a fake iconLabel which updates the property of all descendant spinner TextLabels when indexed
	local textLabel = {}
	setmetatable(textLabel, {__newindex = function(_, index, value)
		for _, label in pairs(numberSpinner.Frame:GetDescendants()) do
			if label:IsA("TextLabel") then
				label[index] = value
			end
		end
	end})

	-- This overrides existing instances and settings so that they update the spinners properties (instead of the old textlabel)
	local iconButton = self:getInstance("iconButton")
	iconButton.ZIndex = 0
	self:setInstance("iconLabel", textLabel)
	self:modifySetting("iconText", {instanceNames = {}}) -- We do this to prevent text being modified within the metatable above
	self:setInstance("iconLabelSpinner", numberSpinner.Frame)
	local settingsToConvert = {"iconLabelVisible", "iconLabelAnchorPoint", "iconLabelPosition", "iconLabelSize"}
	for _, settingName in pairs(settingsToConvert) do
		self:modifySetting(settingName, {instanceNames = {"iconLabelSpinner"}})
	end

	-- This applies all the values we just updated
	self:_updateAll()
	return self
end

function Icon:setEnabled(bool)
	self.enabled = bool
	self.instances.iconContainer.Visible = bool
	self.updated:Fire()
	return self
end

function Icon:setName(string)
	self.name = string
	self.instances.iconContainer.Name = string
	return self
end

function Icon:setProperty(propertyName, value)
	self[propertyName] = value
	return self
end

function Icon:_playClickSound()
	local clickSound = self.instances.clickSound
	if clickSound.SoundId ~= nil and #clickSound.SoundId > 0 and clickSound.Volume > 0 then
		local clickSoundCopy = clickSound:Clone()
		clickSoundCopy.Parent = clickSound.Parent
		clickSoundCopy:Play()
		debris:AddItem(clickSoundCopy, clickSound.TimeLength)
	end
end

function Icon:select(byIcon)
	if self.locked then return self end
	self.isSelected = true
	self:_setToggleItemsVisible(true, byIcon)
	self:_updateNotice()
	self:_updateAll()
	self:_playClickSound()
	if #self.dropdownIcons > 0 or #self.menuIcons > 0 then
		IconController:_updateSelectionGroup()
	end
    self.selected:Fire()
    self.toggled:Fire(self.isSelected)
	return self
end

function Icon:deselect(byIcon)
	if self.locked then return self end
	self.isSelected = false
	self:_setToggleItemsVisible(false, byIcon)
	self:_updateNotice()
	self:_updateAll()
	self:_playClickSound()
	if #self.dropdownIcons > 0 or #self.menuIcons > 0 then
		IconController:_updateSelectionGroup()
	end
    self.deselected:Fire()
    self.toggled:Fire(self.isSelected)
	return self
end

function Icon:notify(clearNoticeEvent, noticeId)
	coroutine.wrap(function()
		if not clearNoticeEvent then
			clearNoticeEvent = self.deselected
		end
		if self._parentIcon then
			self._parentIcon:notify(clearNoticeEvent)
		end

		local notifComplete = Signal.new()
		local endEvent = self._endNotices:Connect(function()
			notifComplete:Fire()
		end)
		local customEvent = clearNoticeEvent:Connect(function()
			notifComplete:Fire()
		end)

		noticeId = noticeId or httpService:GenerateGUID(true)
		self.notices[noticeId] = {
			completeSignal = notifComplete,
			clearNoticeEvent = clearNoticeEvent,
		}
		self.totalNotices += 1
		self:_updateNotice()

		self.notified:Fire(noticeId)
		notifComplete:Wait()

		endEvent:Disconnect()
		customEvent:Disconnect()
		notifComplete:Disconnect()

		self.totalNotices -= 1
		self.notices[noticeId] = nil
		self:_updateNotice()
	end)()
	return self
end

function Icon:_updateNotice()
	local enabled = true
	if self.totalNotices < 1 then
		enabled = false
	end
	-- Deselect
	if not self.isSelected then
		if (#self.dropdownIcons > 0 or #self.menuIcons > 0) and self.totalNotices > 0 then
			enabled = true
		end
	end
	-- Select
	if self.isSelected then
		if #self.dropdownIcons > 0 or #self.menuIcons > 0 then
			enabled = false
		end
	end
	local value = (enabled and 0) or 1
	self:set("noticeImageTransparency", value)
	self:set("noticeTextTransparency", value)
	self.instances.noticeLabel.Text = (self.totalNotices < 100 and self.totalNotices) or "99+"
end

function Icon:clearNotices()
	self._endNotices:Fire()
	return self
end

function Icon:disableStateOverlay(bool)
	if bool == nil then
		bool = true
	end
	local stateOverlay = self.instances.iconOverlay
	stateOverlay.Visible = not bool
	return self
end


Prompt: --[[ Public API ]]

Response:
--
function Thumbstick:Enable()
	Enabled = true
	ThumbstickFrame.Visible = true
	local humanoid = MasterControl:GetHumanoid()
	enableAutoJump(humanoid)
end

function Thumbstick:Disable()
	Enabled = false
	if RevertAutoJumpEnabledToFalse then
		local humanoid = MasterControl:GetHumanoid()
		if humanoid then
			humanoid.AutoJumpEnabled = false
		end
	end
	ThumbstickFrame.Visible = false
	OnMoveTouchEnded()
end

function Thumbstick:Create(parentFrame)
	if ThumbstickFrame then
		ThumbstickFrame:Destroy()
		ThumbstickFrame = nil
		if OnTouchMovedCn then
			OnTouchMovedCn:disconnect()
			OnTouchMovedCn = nil
		end
		if OnTouchEndedCn then
			OnTouchEndedCn:disconnect()
			OnTouchEndedCn = nil
		end
		if OnRenderSteppedCn then
			OnRenderSteppedCn:disconnect()
			OnRenderSteppedCn = nil
		end
		if TouchActivateCn then
			TouchActivateCn:disconnect()
			TouchActivateCn = nil
		end
	end

	local ThumbstickSize = 40
	local ThumbstickRingSize = 58
	local MiddleSize = 13
	local MiddleSpacing = MiddleSize + 5
	local RadiusOfDeadZone = 2
	local RadiusOfMaxSpeed = 50

	local screenSize = parentFrame.AbsoluteSize
	local isBigScreen = math.min(screenSize.x, screenSize.y) > 500
	if isBigScreen then
		ThumbstickSize = ThumbstickSize * 2
		ThumbstickRingSize = ThumbstickRingSize * 2
		MiddleSize = MiddleSize * 2
		MiddleSpacing = MiddleSpacing * 2
		RadiusOfDeadZone = RadiusOfDeadZone * 2
		RadiusOfMaxSpeed = RadiusOfMaxSpeed * 2
	end

	local color = Color3.fromRGB(255, 255, 255)

	local function layoutThumbstickFrame(portraitMode)
		if portraitMode then
			ThumbstickFrame.Size = UDim2.new(1, 0, .4, 0)
			ThumbstickFrame.Position = UDim2.new(0, 0, 0.6, 0)
		else
			ThumbstickFrame.Size = UDim2.new(1, 0, .5, 18)
			ThumbstickFrame.Position = UDim2.new(0, 0, 0.5, -18)
		end
	end

	ThumbstickFrame = Instance.new('Frame')
	ThumbstickFrame.Name = "DynamicThumbstickFrame"
	ThumbstickFrame.Active = false
	ThumbstickFrame.Visible = false
	ThumbstickFrame.BackgroundTransparency = 1.0
	ThumbstickFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
	layoutThumbstickFrame()

	StartImage = Instance.new("ImageLabel")
	StartImage.Name = "ThumbstickStart"
	StartImage.Visible = false
	StartImage.BackgroundTransparency = 1
	StartImage.Image = IMAGE_RING
	StartImage.AnchorPoint = Vector2.new(0.5, 0.5)
	StartImage.Parent = ThumbstickFrame

	EndImage = Instance.new("ImageLabel")
	EndImage.Name = "ThumbstickEnd"
	EndImage.Visible = false
	EndImage.BackgroundTransparency = 1
	EndImage.Image = IMAGE_DISK
	EndImage.ImageTransparency = 0.20
	EndImage.AnchorPoint = Vector2.new(0.5, 0.5)
	EndImage.Parent = ThumbstickFrame

	for i = 1, NUM_MIDDLE_IMAGES do
		MiddleImages[i] = Instance.new("ImageLabel")
		MiddleImages[i].Name = "ThumbstickMiddle"
		MiddleImages[i].Visible = false
		MiddleImages[i].BackgroundTransparency = 1
		MiddleImages[i].Image = IMAGE_DISK
		MiddleImages[i].ImageTransparency = MIDDLE_TRANSPARENCIES[i]
		MiddleImages[i].AnchorPoint = Vector2.new(0.5, 0.5)
		MiddleImages[i].Parent = ThumbstickFrame
	end

	local CameraChangedConn = nil
	local function onWorkspaceChanged(property)
		if property == 'CurrentCamera' then
			if CameraChangedConn then
				CameraChangedConn:Disconnect()
				CameraChangedConn = nil
			end
			local newCamera = workspace.CurrentCamera
			if newCamera then
				local size = newCamera.ViewportSize
				local portraitMode = size.X < size.Y
				layoutThumbstickFrame(portraitMode)
				CameraChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
					size = newCamera.ViewportSize
					portraitMode = size.X < size.Y
					layoutThumbstickFrame(portraitMode)
				end)
			end
		end
	end
	workspace.Changed:Connect(onWorkspaceChanged)
	if workspace.CurrentCamera then
		onWorkspaceChanged('CurrentCamera')
	end

	local JumpTouchObject = nil
	local JumpTouchStartTime = nil
	local JumpTouchStartPosition = nil

	local MoveTouchObject = nil
	local MoveTouchStartTime = nil
	local MoveTouchStartPosition = nil

	local function doMove(direction)
		MasterControl:AddToPlayerMovement(-currentMoveVector)

		currentMoveVector = direction

		-- Scaled Radial Dead Zone
		local inputAxisMagnitude = currentMoveVector.magnitude
		if inputAxisMagnitude < RadiusOfDeadZone then
			currentMoveVector = Vector3.new()
		else
			currentMoveVector = currentMoveVector.unit*(1 - math.max(0, (RadiusOfMaxSpeed - currentMoveVector.magnitude)/RadiusOfMaxSpeed))
			currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y)
		end

		MasterControl:AddToPlayerMovement(currentMoveVector)
	end

	local TweenInAlphaStart = nil
	local TweenOutAlphaStart = nil
	OnRenderSteppedCn = RunService.RenderStepped:Connect(function(step)
		if TweenInAlphaStart ~= nil then
			local delta = tick() - TweenInAlphaStart
			local fadeInTime = (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance)
			ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha*math.min(delta/fadeInTime, 1)
			if delta > fadeInTime then
				TweenOutAlphaStart = tick()
				TweenInAlphaStart = nil
			end
		elseif TweenOutAlphaStart ~= nil then
			local delta = tick() - TweenOutAlphaStart
			local fadeOutTime = (FadeInAndOutHalfDuration * 2) - (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance)
			ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha + FadeInAndOutMaxAlpha*math.min(delta/fadeOutTime, 1)
			if delta > fadeOutTime  then
				TweenOutAlphaStart = nil
			end
		end
	end)

	local function layoutMiddleImages(startPos, endPos)
		local startDist = (ThumbstickSize / 2) + MiddleSize
		local dist = startDist
		local vector = endPos - startPos
		local totalDist = vector.magnitude - (ThumbstickSize / 2) - (ThumbstickRingSize / 2) - (MiddleSize / 2)
		local direction = vector.unit

		local distNeeded = dist + (MiddleSpacing * NUM_MIDDLE_IMAGES)
		local spacing = 0

		if distNeeded > totalDist then
			spacing = MiddleSpacing
		else
			spacing = totalDist / NUM_MIDDLE_IMAGES
		end

		for i = 1, NUM_MIDDLE_IMAGES do
			local image = MiddleImages[i]
			local currentDist = startDist + (spacing * (i - 1))

			if currentDist < totalDist then
				local pos = endPos - direction * currentDist

				image.Visible = true
				image.Position = UDim2.new(0, pos.X, 0, pos.Y)
				image.Size = UDim2.new(0, MiddleSize, 0, MiddleSize)
			else
				image.Visible = false
			end
		end
	end

	local function moveStick(pos)
		local startPos = Vector2.new(MoveTouchStartPosition.X, MoveTouchStartPosition.Y) - ThumbstickFrame.AbsolutePosition
		local endPos = Vector2.new(pos.X, pos.Y) - ThumbstickFrame.AbsolutePosition
		local relativePosition = endPos - startPos
		local length = relativePosition.magnitude
		local maxLength = ThumbstickFrame.AbsoluteSize.X

		length = math.min(length, maxLength)
		relativePosition = relativePosition*length

		EndImage.Position = UDim2.new(0, endPos.X, 0, endPos.Y)
		EndImage.Size = UDim2.new(0, ThumbstickSize, 0, ThumbstickSize)

		layoutMiddleImages(startPos, endPos)
	end

	-- input connections
	ThumbstickFrame.InputBegan:connect(function(inputObject)
		if inputObject.UserInputType ~= Enum.UserInputType.Touch or inputObject.UserInputState ~= Enum.UserInputState.Begin then
			return
		end
		if MoveTouchObject then
			if not JumpTouchObject then
				JumpTouchObject = inputObject
				JumpTouchStartTime = tick()
				JumpTouchStartPosition = inputObject.Position
			end
			return
		end

		MoveTouchObject = inputObject
		MoveTouchStartTime = tick()
		MoveTouchStartPosition = inputObject.Position
		local startPosVec2 = Vector2.new(inputObject.Position.X - ThumbstickFrame.AbsolutePosition.X, inputObject.Position.Y - ThumbstickFrame.AbsolutePosition.Y)

		StartImage.Visible = true
		StartImage.Position = UDim2.new(0, startPosVec2.X, 0, startPosVec2.Y)
		StartImage.Size = UDim2.new(0, ThumbstickRingSize, 0, ThumbstickRingSize)
		EndImage.Visible = true
		EndImage.Position = StartImage.Position
		EndImage.Size = UDim2.new(0, ThumbstickSize, 0, ThumbstickSize)

		if FadeInAndOutBackground then
			local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
			local hasFadedBackgroundInOrientation = false

			-- only fade in/out the background once per orientation
			if playerGui then
				if playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or
					playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight then
						hasFadedBackgroundInOrientation = HasFadedBackgroundInLandscape
						HasFadedBackgroundInLandscape = true
				elseif playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait then
						hasFadedBackgroundInOrientation = HasFadedBackgroundInPortrait
						HasFadedBackgroundInPortrait = true
				end
			end

			if not hasFadedBackgroundInOrientation then
				FadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT
				FadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT
				TweenInAlphaStart = tick()
			end
		end
	end)

	OnTouchMovedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed)
		if inputObject == MoveTouchObject then

			local direction = Vector2.new(inputObject.Position.x - MoveTouchStartPosition.x, inputObject.Position.y - MoveTouchStartPosition.y)
			if math.abs(direction.x) > 0 or math.abs(direction.y) > 0 then
				doMove(direction)
				moveStick(inputObject.Position)
			end
		end
	end)

	OnMoveTouchEnded = function()
		StartImage.Visible = false
		EndImage.Visible = false

		for i = 1, NUM_MIDDLE_IMAGES do
			MiddleImages[i].Visible = false
		end

		MoveTouchObject = nil

		MasterControl:AddToPlayerMovement(-currentMoveVector)
		currentMoveVector = Vector3.new(0,0,0)
	end

	--todo: remove this pcall when TouchTapInWorld is on for all platforms
	local success = pcall(function()
		local function positionIntersectsGuiObject(position, guiObject)
			if position.X < guiObject.AbsolutePosition.X + guiObject.AbsoluteSize.X
				and position.X > guiObject.AbsolutePosition.X
				and position.Y < guiObject.AbsolutePosition.Y + guiObject.AbsoluteSize.Y
				and position.Y > guiObject.AbsolutePosition.Y then
				return true
			end
			return false
		end

		TouchActivateCn = UserInputService.TouchTapInWorld:connect(function(touchPos, processed)
			if not processed and Enabled and not IsAToolEquipped and positionIntersectsGuiObject(touchPos, ThumbstickFrame) then
				MasterControl:DoJump()
			end
		end)
	end)

	if not success then
		local function JumpIfTouchIsTap(startTime, startPosition, position)
			if (not IsAToolEquipped) and tick() - startTime < TOUCH_IS_TAP_TIME_THRESHOLD then
				if (position - startPosition).magnitude < TOUCH_IS_TAP_DISTANCE_THRESHOLD then
					MasterControl:DoJump()
				end
			end
		end

		OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed)
			if inputObject == MoveTouchObject then
				JumpIfTouchIsTap(MoveTouchStartTime, MoveTouchStartPosition, inputObject.Position)
				OnMoveTouchEnded()
			elseif inputObject == JumpTouchObject then
				JumpIfTouchIsTap(JumpTouchStartTime, JumpTouchStartPosition, inputObject.Position)
				JumpTouchObject = nil
			end
		end)
	else
		OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed)
			if inputObject == MoveTouchObject then
				OnMoveTouchEnded()
			elseif inputObject == JumpTouchObject then
				JumpTouchObject = nil
			end
		end)
	end

	GuiService.MenuOpened:connect(function()
		if MoveTouchObject then
			OnMoveTouchEnded()
		end
		if JumpTouchObject then
			JumpTouchObject = nil
		end
	end)

	local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
	while not playerGui do
		LocalPlayer.ChildAdded:wait()
		playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
	end

	local playerGuiChangedConn = nil
	local originalScreenOrientationWasLandscape = playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or
													playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight

	local function longShowBackground()
		FadeInAndOutHalfDuration = 2.5
		FadeInAndOutBalance = 0.05
		TweenInAlphaStart = tick()
	end

	playerGuiChangedConn = playerGui.Changed:connect(function(prop)
		if prop == "CurrentScreenOrientation" then
			if (originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait) or
				(not originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation ~= Enum.ScreenOrientation.Portrait) then
					playerGuiChangedConn:disconnect()
					longShowBackground()

					if originalScreenOrientationWasLandscape then
						HasFadedBackgroundInPortrait = true
					else
						HasFadedBackgroundInLandscape = true
					end
			end
		end
	end)

	ThumbstickFrame.Parent = parentFrame

	spawn(function()
		if game:IsLoaded() then
			longShowBackground()
		else
			game.Loaded:wait()
			longShowBackground()
		end
	end)
end

return Thumbstick


Prompt:
-- Actual measured distance to the camera Focus point, which may be needed in special circumstances, but should
-- never be used as the starting point for updating the nominal camera-to-subject distance (self.currentSubjectDistance)
-- since that is a desired target value set only by mouse wheel (or equivalent) input, PopperCam, and clamped to min max camera distance

Response:
function BaseCamera:GetMeasuredDistanceToFocus(): number?
	local camera = game.Workspace.CurrentCamera
	if camera then
		return (camera.CoordinateFrame.p - camera.Focus.p).magnitude
	end
	return nil
end

function BaseCamera:GetCameraLookVector(): Vector3
	return game.Workspace.CurrentCamera and game.Workspace.CurrentCamera.CFrame.LookVector or UNIT_Z
end

function BaseCamera:CalculateNewLookCFrameFromArg(suppliedLookVector: Vector3?, rotateInput: Vector2): CFrame
	local currLookVector: Vector3 = suppliedLookVector or self:GetCameraLookVector()
	local currPitchAngle = math.asin(currLookVector.Y)
	local yTheta = math.clamp(rotateInput.Y, -MAX_Y + currPitchAngle, -MIN_Y + currPitchAngle)
	local constrainedRotateInput = Vector2.new(rotateInput.X, yTheta)
	local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local newLookCFrame = CFrame.Angles(0, -constrainedRotateInput.X, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.Y,0,0)
	return newLookCFrame
end

function BaseCamera:CalculateNewLookVectorFromArg(suppliedLookVector: Vector3?, rotateInput: Vector2): Vector3
	local newLookCFrame = self:CalculateNewLookCFrameFromArg(suppliedLookVector, rotateInput)
	return newLookCFrame.LookVector
end

function BaseCamera:CalculateNewLookVectorVRFromArg(rotateInput: Vector2): Vector3
	local subjectPosition: Vector3 = self:GetSubjectPosition()
	local vecToSubject: Vector3 = (subjectPosition - (game.Workspace.CurrentCamera :: Camera).CFrame.p)
	local currLookVector: Vector3 = (vecToSubject * X1_Y0_Z1).unit
	local vrRotateInput: Vector2 = Vector2.new(rotateInput.X, 0)
	local startCFrame: CFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local yawRotatedVector: Vector3 = (CFrame.Angles(0, -vrRotateInput.X, 0) * startCFrame * CFrame.Angles(-vrRotateInput.Y,0,0)).LookVector
	return (yawRotatedVector * X1_Y0_Z1).unit
end

function BaseCamera:GetHumanoid(): Humanoid?
	local character = player and player.Character
	if character then
		local resultHumanoid = self.humanoidCache[player]
		if resultHumanoid and resultHumanoid.Parent == character then
			return resultHumanoid
		else
			self.humanoidCache[player] = nil -- Bust Old Cache
			local humanoid = character:FindFirstChildOfClass("Humanoid")
			if humanoid then
				self.humanoidCache[player] = humanoid
			end
			return humanoid
		end
	end
	return nil
end

function BaseCamera:GetHumanoidPartToFollow(humanoid: Humanoid, humanoidStateType: Enum.HumanoidStateType) -- BasePart
	if HUMANOID_STATES[humanoidStateType] then
		local character = humanoid.Parent
		if character then
			local torso = nil
			if humanoid.RigType == Enum.HumanoidRigType.R15 then
				torso = character:FindFirstChild("LowerTorso")
			else
				torso = character:FindFirstChild("Torso")
			end

			return torso or humanoid.Torso
		else
			return humanoid.Torso
		end
	else
		return humanoid.Torso
	end
end

function BaseCamera:OnNewCameraSubject()
	if self.subjectStateChangedConn then
		self.subjectStateChangedConn:Disconnect()
		self.subjectStateChangedConn = nil
	end
end

function BaseCamera:IsInFirstPerson()
	return self.inFirstPerson
end

function BaseCamera:Update(dt)
	error("BaseCamera:Update() This is a virtual function that should never be getting called.", 2)
end

function BaseCamera:GetCameraHeight()
	if VRService.VREnabled and not self.inFirstPerson then
		return math.sin(VR_ANGLE) * self.currentSubjectDistance
	end
	return 0
end

return BaseCamera


Prompt: -- Settings

Response:
local Configuration = script.Parent:WaitForChild("Configuration")
local WheelSpeed = Configuration:WaitForChild("WheelSpeed")
local WheelMaxRideTime = Configuration:WaitForChild("WheelMaxRideTime")


Prompt: --Starting Text

Response:
while (game.Workspace.Global_Scripts["Main Script"].EnableTalk.checker.Value == true) do
	wait(2)
	if(game.Workspace.Global_Scripts["Main Script"].EnableTalk.Value == true) then
		text.Text = ""
		while(fade > 0) do
			fade = fade - .05
			image.ImageTransparency = fade
			text.TextTransparency = fade
			frame.BackgroundTransparency = fade
			wait(0.1)
		end
		----------------------------------------------

		script.Parent.MouseButton1Click:Connect(function()
 if script.Parent.Parent.Open.Value == false then
  script.Parent.Parent.Open.Value = true
  script.Parent.Parent.GUI_BODY:TweenPosition(UDim2.new(0.45, -390, 0.5, -200),"Out","Quint",1,true)
 else
  script.Parent.Parent.Open.Value = false
  script.Parent.Parent.GUI_BODY:TweenPosition(UDim2.new(0.45, -390, -0.5, -200),"Out","Quint",1,true)
 end
end)

		----- include this script so the text goes up and then down


Prompt:
--[[
		___      _______                _
	   / _ |____/ ___/ /  ___ ____ ___ (_)__
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

Response:
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Rev")

if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end

	car.DriveSeat.Rev:Play()

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value

		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^0.5
	end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
	handler:FireServer("playSound","Rev")
	local pitch=0
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value

		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume)
	end
end


Prompt: --reset

Response:
script.Parent.Mode.Value = 1
end
end)

script.Parent.Mode.Changed:connect(function()
if script.Parent.Mode.Value == 1 then
script.Parent.B1.Transparency = 0
script.Parent.Main.Transparency = 1
script.Parent.B2.Transparency = 1
elseif script.Parent.Mode.Value == 2 then
script.Parent.B1.Transparency = 1
script.Parent.Main.Transparency = 1
script.Parent.B2.Transparency = 0
end
end)

script.Parent.Main.ClickDetector.MouseClick:connect (ChangeMode)


Prompt: -- obtain goals based on Center part

Response:
center.BodyPosition.position = beacon.Center.Position
teamColor = center.Color
vel = center.BodyVelocity

healerIsResting = false

function restHealer()
	healerIsResting = true
	wait(5)
	healerIsResting = false
end

local Team = Instance.new("Team")
Team.TeamColor = BrickColor.new(teamColor)
Team.Name = Team.TeamColor.Name
Team.AutoAssignable = false
function joinTeam(humanoid)

	local team = Instance.new("Color3Value")
	team.Value = teamColor
	team.Name = "Team"
	team.Parent = humanoid

	local vCharacter = humanoid.Parent
	if vCharacter then
		Team.Parent = game:GetService("Teams")
		local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
		if vPlayer then
			vPlayer.Neutral = false
			vPlayer.TeamColor = BrickColor.new(teamColor)

			spawn(function()
				local message = Instance.new("Message")
				message.Text = string.format("You're now on the %s team!", Team.Name)
				message.Parent = vPlayer
				wait(5)
				message.Text =  "Touch the beacon again to heal you!"
				wait(5)
				message:Destroy()
			end)
		end
	end


Prompt:
--[[

	tweenJoint Function Parameters:

	Object Joint - This has to be a weld with a C0 and C1 property

	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0

	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1

	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end

	float Duration - This is how long the tweening takes to complete

--]]

Response:
local RS = game:GetService("RunService")

local Proned2

Rendido.Changed:Connect(function()
	Stance:FireServer(Stances,Virar,Rendido.Value)
end)

Algemado.Changed:Connect(function()
	Stance:FireServer(Stances,Virar,Rendido.Value)
end)

function Stand()

	Stance:FireServer(Stances,Virar,Rendido.Value)
	TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play()

	if Steady then
		Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value
		Humanoid.JumpPower = ServerConfig.JumpPower
		else
		if  Ferido.Value == false then
			Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value
			Humanoid.JumpPower = ServerConfig.JumpPower
		else
			Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value
			Humanoid.JumpPower = ServerConfig.JumpPower
		end
	end

	IsStanced = false
	Proned2 = Vector3.new(0,0,0)

end

function Crouch()

	Stance:FireServer(Stances,Virar,Rendido.Value)
	TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play()
	Humanoid.WalkSpeed = ServerConfig.CrouchWalkSpeed * StancesPasta.Mobility.Value
	Humanoid.JumpPower = 0
	IsStanced = true
	Proned2 = Vector3.new(0,0,0)
end

function Prone()

	Stance:FireServer(Stances,Virar,Rendido.Value)
	TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play()
	if Rendido.Value == true then
	Humanoid.WalkSpeed = 0
	else
	Humanoid.WalkSpeed = ServerConfig.ProneWalksSpeed * StancesPasta.Mobility.Value
	end
	Humanoid.JumpPower = 0
	IsStanced = true
	Proned2 = Vector3.new(0,0.5,0.5)
end

function Lean()

TS:Create(char.Humanoid, TweenInfo.new(.3), {CameraOffset = Vector3.new(CameraX,CameraY,0)} ):Play()
Stance:FireServer(Stances,Virar,Rendido.Value)
end

UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if not gameProcessed then
		if input.KeyCode == Enum.KeyCode.C and Stances == 0 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then
			Stances = 1
			--CameraX = 0
			CameraY = -1
			Poses.Levantado.Visible = false
			Poses.Agaixado.Visible = true
			Poses.Deitado.Visible = false
			Crouch()

			_G.Crouched = true
		elseif input.KeyCode == Enum.KeyCode.C and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado then
			Stances = 2
			CameraX = 0
			CameraY = -3.25
			Virar = 0
			Poses.Levantado.Visible = false
			Poses.Agaixado.Visible = false
			Poses.Deitado.Visible = true
			Poses.Esg_Right.Visible = false
			Poses.Esg_Left.Visible = false
			Lean()
			Prone()

			_G.Crouched = false
			_G.Proned = true

		elseif input.KeyCode == Enum.KeyCode.X and Stances == 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado  then
			_G.Crouched = true
			_G.Proned = false
			Stances = 1
			--CameraX = 0
			CameraY = -1
			Poses.Levantado.Visible = false
			Poses.Agaixado.Visible = true
			Poses.Deitado.Visible = false
			Crouch()

		elseif input.KeyCode == Enum.KeyCode.X and Stances == 1 and ChangeStance and Caido.Value == false and Correndo.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado  then
			_G.Crouched = false
			Stances = 0
			--CameraX = 0
			CameraY = 0
			Poses.Levantado.Visible = true
			Poses.Agaixado.Visible = false
			Poses.Deitado.Visible = false
			Stand()
		elseif input.KeyCode == Enum.KeyCode.Z and ChangeStance and Caido.Value == false and Correndo.Value == false then
				if not Steady then
				Steady = true
				Poses.Steady.Visible = true
					if Stances == 0 then
						Stand()
						Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value
					end
				else
				Steady = false
				Poses.Steady.Visible = false
					if Stances == 0 then
						Stand()
						Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value
					end
				end
		elseif input.KeyCode == Enum.KeyCode.E and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and not _G.Lean and CanLean then
			if Virar == 0 or Virar == -1 then
				Virar = 1
				CameraX = 1.75
				Poses.Esg_Right.Visible = true
				Poses.Esg_Left.Visible = false
			else
				Virar = 0
				CameraX = 0
				Poses.Esg_Right.Visible = false
				Poses.Esg_Left.Visible = false
			end
			Lean()
		elseif input.KeyCode == Enum.KeyCode.Q and Stances ~= 2 and ChangeStance and Caido.Value == false and Correndo.Value == false and not _G.Lean and CanLean  then
			if Virar == 0 or Virar == 1 then
				Virar = -1
				CameraX = -1.75
				Poses.Esg_Right.Visible = false
				Poses.Esg_Left.Visible = true
			else
				Virar = 0
				CameraX = 0
				Poses.Esg_Right.Visible = false
				Poses.Esg_Left.Visible = false
			end
			Lean()
		elseif input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == false and Ferido.Value == false and Caido.Value == false and Rappeling.Value == false and not _G.Lean and not Sentado and not cansado then
			if Velocidade > 0 then
			ChangeStance = false
			Correndo.Value = true
			--Steady = false
			Stand()
			Stances = 0
			Virar = 0
			CameraX = 0
			CameraY = 0
			Lean()
			Poses.Levantado.Visible = true
			Poses.Agaixado.Visible = false
			Poses.Deitado.Visible = false
			Poses.Esg_Right.Visible = false
			Poses.Esg_Left.Visible = false
			Humanoid.WalkSpeed = ServerConfig.RunWalkSpeed * StancesPasta.Mobility.Value
			end
			end
		end
	end)

UserInputService.InputEnded:Connect(function(input, gameProcessed)
if not gameProcessed then
	if input.KeyCode == Enum.KeyCode.LeftShift and Correndo.Value == true and not _G.Lean then
		ChangeStance = true
		Correndo.Value = false
		if Steady then
		Humanoid.WalkSpeed = ServerConfig.SlowPaceWalkSpeed * StancesPasta.Mobility.Value
		Poses.Steady.Visible = true
		else
		Humanoid.WalkSpeed = ServerConfig.NormalWalkSpeed * StancesPasta.Mobility.Value
		Poses.Steady.Visible = false
		end
		end
	end
end)

Stand()

Humanoid.Died:Connect(function()
	TS:Create(char.Humanoid, TweenInfo.new(1), {CameraOffset = Vector3.new(0,0,0)} ):Play()
	ChangeStance = false
	Main.Visible = false
end)

Humanoid.Seated:Connect(function(IsSeated, Seat)

	if IsSeated  then
		Sentado = true
		Stand()
		Stances = 0
		Virar = 0
		CameraX = 0
		CameraY = 0
		Lean()
		Poses.Levantado.Visible = true
		Poses.Agaixado.Visible = false
		Poses.Deitado.Visible = false
		Poses.Esg_Right.Visible = false
		Poses.Esg_Left.Visible = false

		if Seat:IsA("VehicleSeat") then
			CanLean = false
		end

	else
		Sentado = false
		CanLean = true
	end
end)

Humanoid.Running:Connect(function(Speed)


Prompt:
--[[
	This is a simple signal implementation that has a dead-simple API.

		local signal = createSignal()

		local disconnect = signal:subscribe(function(foo)
			print("Cool foo:", foo)
		end)

		signal:fire("something")

		disconnect()
]]

Response:
local function createSignal()
	local connections = {}
	local suspendedConnections = {}
	local firing = false

	local function subscribe(self, callback)
		assert(typeof(callback) == "function", "Can only subscribe to signals with a function.")

		local connection = {
			callback = callback,
			disconnected = false,
		}

		-- If the callback is already registered, don't add to the suspendedConnection. Otherwise, this will disable
		-- the existing one.
		if firing and not connections[callback] then
			suspendedConnections[callback] = connection
		end

		connections[callback] = connection

		local function disconnect()
			assert(not connection.disconnected, "Listeners can only be disconnected once.")

			connection.disconnected = true
			connections[callback] = nil
			suspendedConnections[callback] = nil
		end

		return disconnect
	end

	local function fire(self, ...)
		firing = true
		for callback, connection in pairs(connections) do
			if not connection.disconnected and not suspendedConnections[callback] then
				callback(...)
			end
		end

		firing = false

		for callback, _ in pairs(suspendedConnections) do
			suspendedConnections[callback] = nil
		end
	end

	return {
		subscribe = subscribe,
		fire = fire,
	}
end

return createSignal


Prompt: -- Flashing Lights --

Response:
function Functions.Flash(Color)
	if Color == nil then return end
	for i = 1,2 do
		wait(0.1)
		DoorLogo.BrickColor = BrickColor.new(Color)
		wait(0.1)
		DoorLogo.BrickColor = BrickColor.new("Really red")
	end
end


Prompt: -- Movement mode standardized to Enum.ComputerCameraMovementMode values

Response:
function ClassicCamera:SetCameraMovementMode( cameraMovementMode )
	BaseCamera.SetCameraMovementMode(self,cameraMovementMode)
	self.isFollowCamera = cameraMovementMode == Enum.ComputerCameraMovementMode.Follow
end

function ClassicCamera:Test()
end

function ClassicCamera:Update()
	local now = tick()
	local timeDelta = (now - self.lastUpdate)

	local camera = 	workspace.CurrentCamera
	local newCameraCFrame = camera.CFrame
	local newCameraFocus = camera.Focus
	local overrideCameraLookVector = nil
	if self.resetCameraAngle then
		local rootPart = self:GetHumanoidRootPart()
		if rootPart then
			overrideCameraLookVector = (rootPart.CFrame * INITIAL_CAMERA_ANGLE).lookVector
		else
			overrideCameraLookVector = INITIAL_CAMERA_ANGLE.lookVector
		end
		self.resetCameraAngle = false
	end

	local player = PlayersService.LocalPlayer
	local humanoid = self:GetHumanoid()
	local cameraSubject = camera.CameraSubject
	local isInVehicle = cameraSubject and cameraSubject:IsA('VehicleSeat')
	local isOnASkateboard = cameraSubject and cameraSubject:IsA('SkateboardPlatform')
	local isClimbing = humanoid and humanoid:GetState() == Enum.HumanoidStateType.Climbing

	if self.lastUpdate == nil or timeDelta > 1 then
		self.lastCameraTransform = nil
	end

	if self.lastUpdate then
		local gamepadRotation = self:UpdateGamepad()

		if self:ShouldUseVRRotation() then
			self.rotateInput = self.rotateInput + self:GetVRRotationInput()
		else
			-- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from
			local delta = math.min(0.1, timeDelta)

			if gamepadRotation ~= ZERO_VECTOR2 then
				self.rotateInput = self.rotateInput + (gamepadRotation * delta)
			end

			local angle = 0
			if not (isInVehicle or isOnASkateboard) then
				angle = angle + (self.turningLeft and -120 or 0)
				angle = angle + (self.turningRight and 120 or 0)
			end

			if angle ~= 0 then
				self.rotateInput = self.rotateInput +  Vector2.new(math.rad(angle * delta), 0)
			end
		end
	end

	-- Reset tween speed if user is panning
	if self.userPanningTheCamera then
		tweenSpeed = 0
		self.lastUserPanCamera = tick()
	end

	local userRecentlyPannedCamera = now - self.lastUserPanCamera < TIME_BEFORE_AUTO_ROTATE
	local subjectPosition = self:GetSubjectPosition()

	if subjectPosition and player and camera then
		local zoom = self:GetCameraToSubjectDistance()
		if zoom < 0.5 then
			zoom = 0.5
		end

		if self:GetIsMouseLocked() and not self:IsInFirstPerson() then
			-- We need to use the right vector of the camera after rotation, not before
			local newLookCFrame = self:CalculateNewLookCFrame(overrideCameraLookVector)

			local offset = self:GetMouseLockOffset()
			local cameraRelativeOffset = offset.X * newLookCFrame.rightVector + offset.Y * newLookCFrame.upVector + offset.Z * newLookCFrame.lookVector

			--offset can be NAN, NAN, NAN if newLookVector has only y component
			if Util.IsFiniteVector3(cameraRelativeOffset) then
				subjectPosition = subjectPosition + cameraRelativeOffset
			end
		else
			if not self.userPanningTheCamera and self.lastCameraTransform then

				local isInFirstPerson = self:IsInFirstPerson()

				if (isInVehicle or isOnASkateboard or (self.isFollowCamera and isClimbing)) and self.lastUpdate and humanoid and humanoid.Torso then
					if isInFirstPerson then
						if self.lastSubjectCFrame and (isInVehicle or isOnASkateboard) and cameraSubject:IsA('BasePart') then
							local y = -Util.GetAngleBetweenXZVectors(self.lastSubjectCFrame.lookVector, cameraSubject.CFrame.lookVector)
							if Util.IsFinite(y) then
								self.rotateInput = self.rotateInput + Vector2.new(y, 0)
							end
							tweenSpeed = 0
						end
					elseif not userRecentlyPannedCamera then
						local forwardVector = humanoid.Torso.CFrame.lookVector
						if isOnASkateboard then
							forwardVector = cameraSubject.CFrame.lookVector
						end

						tweenSpeed = Util.Clamp(0, tweenMaxSpeed, tweenSpeed + tweenAcceleration * timeDelta)

						local percent = Util.Clamp(0, 1, tweenSpeed * timeDelta)
						if self:IsInFirstPerson() and not (self.isFollowCamera and self.isClimbing) then
							percent = 1
						end

						local y = Util.GetAngleBetweenXZVectors(forwardVector, self:GetCameraLookVector())
						if Util.IsFinite(y) and math.abs(y) > 0.0001 then
							self.rotateInput = self.rotateInput + Vector2.new(y * percent, 0)
						end
					end

				elseif self.isFollowCamera and (not (isInFirstPerson or userRecentlyPannedCamera) and not VRService.VREnabled) then
					-- Logic that was unique to the old FollowCamera module
					local lastVec = -(self.lastCameraTransform.p - subjectPosition)

					local y = Util.GetAngleBetweenXZVectors(lastVec, self:GetCameraLookVector())

					-- This cutoff is to decide if the humanoid's angle of movement,
					-- relative to the camera's look vector, is enough that
					-- we want the camera to be following them. The point is to provide
					-- a sizable dead zone to allow more precise forward movements.
					local thetaCutoff = 0.4

					-- Check for NaNs
					if Util.IsFinite(y) and math.abs(y) > 0.0001 and math.abs(y) > thetaCutoff * timeDelta then
						self.rotateInput = self.rotateInput + Vector2.new(y, 0)
					end
				end
			end
		end

		if not self.isFollowCamera then
			local VREnabled = VRService.VREnabled

			if VREnabled then
				newCameraFocus = self:GetVRFocus(subjectPosition, timeDelta)
			else
				newCameraFocus = CFrame.new(subjectPosition)
			end

			local cameraFocusP = newCameraFocus.p
			if VREnabled and not self:IsInFirstPerson() then
				local cameraHeight = self:GetCameraHeight()
				local vecToSubject = (subjectPosition - camera.CFrame.p)
				local distToSubject = vecToSubject.magnitude

				-- Only move the camera if it exceeded a maximum distance to the subject in VR
				if distToSubject > zoom or self.rotateInput.x ~= 0 then
					local desiredDist = math.min(distToSubject, zoom)
					vecToSubject = self:CalculateNewLookVectorVR() * desiredDist
					local newPos = cameraFocusP - vecToSubject
					local desiredLookDir = camera.CFrame.lookVector
					if self.rotateInput.x ~= 0 then
						desiredLookDir = vecToSubject
					end
					local lookAt = Vector3.new(newPos.x + desiredLookDir.x, newPos.y, newPos.z + desiredLookDir.z)
					self.rotateInput = ZERO_VECTOR2

					newCameraCFrame = CFrame.new(newPos, lookAt) + Vector3.new(0, cameraHeight, 0)
				end
			else
				local newLookVector = self:CalculateNewLookVector(overrideCameraLookVector)
				self.rotateInput = ZERO_VECTOR2
				newCameraCFrame = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP)
			end
		else -- is FollowCamera
			local newLookVector = self:CalculateNewLookVector(overrideCameraLookVector)
			self.rotateInput = ZERO_VECTOR2

			if VRService.VREnabled then
				newCameraFocus = self:GetVRFocus(subjectPosition, timeDelta)
			else
				newCameraFocus = CFrame.new(subjectPosition)
			end
			newCameraCFrame = CFrame.new(newCameraFocus.p - (zoom * newLookVector), newCameraFocus.p) + Vector3.new(0, self:GetCameraHeight(), 0)
		end

		self.lastCameraTransform = newCameraCFrame
		self.lastCameraFocus = newCameraFocus
		if (isInVehicle or isOnASkateboard) and cameraSubject:IsA('BasePart') then
			self.lastSubjectCFrame = cameraSubject.CFrame
		else
			self.lastSubjectCFrame = nil
		end
	end

	self.lastUpdate = now
	return newCameraCFrame, newCameraFocus
end

function ClassicCamera:EnterFirstPerson()
	self.inFirstPerson = true
	self:UpdateMouseBehavior()
end

function ClassicCamera:LeaveFirstPerson()
	self.inFirstPerson = false
	self:UpdateMouseBehavior()
end

return ClassicCamera


Prompt: --Put this in a r15 model character or it wont work.


Prompt: --------------------) Settings

Response:
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 15 -- cooldown for use of the tool again

ZoneModelName = "Bullet hell" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage


Prompt: -- Functions --

Response:
local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id="..sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	print(player.Name.." clicked on Uniform Giver")

	playSoundLocal(152206246,player)	-- Declaring the sound ID and Parent

	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
			print("Shirt found, reconstructing for "..player.Name)
			player.Character.Shirt:remove()
			local newShirt = Instance.new("Shirt",player.Character)
			newShirt.Name = "Shirt"
		end
	end

	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
			print("Pants found, reconstructing for "..player.Name)
			player.Character.Pants:remove()
			local newPants = Instance.new("Pants",player.Character)
			newPants.Name = "Pants"
		end
	end

	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
end

local function onHoverEnter(player)
	cPart.Transparency = 1
	cPart.BrickColor = BrickColor.White()
end

local function onHoverLeave(player)
	cPart.BrickColor = BrickColor.Gray()
	cPart.Transparency = 1
end


Prompt: --DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!

Response:
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.BallonBow


Prompt: -- Get services

Response:
local players = game:GetService("Players")
local soundService = game:GetService("SoundService")


Prompt:
--[=[
	Cleans up the service bag and all services that have been
	initialized in the service bag.
]=]

Response:
function ServiceBag:Destroy()
	local super = getmetatable(ServiceBag)

	self._destroying:Fire()

	local services = self._services
	local key, service = next(services)
	while service ~= nil do
		services[key] = nil

		if not (self._serviceTypesToInitializeSet and self._serviceTypesToInitializeSet[key]) then
			task.spawn(function()
				if service.Destroy then
					service:Destroy()
				end
			end)
		end
		key, service = next(services)
	end

	super.Destroy(self)
end

return ServiceBag


Prompt: -- Globals

Response: local AUTOSAVE_INTERVAL = 300 -- 5 minutes


Prompt: -- Mount the ProfileCard to the playerGui

Response:
Roact.mount(
	Roact.createElement(ConfigContext.ConfigurationProvider, {
		config = ProfileCardConfiguration,
	}, {
		ProfileCard = Roact.createElement(ProfileCard, {
			adornee = HumanoidRootPart,
			controls = controls,
		}),
	}),
	playerGui,
	"MountedProfileCard"
)


Prompt: --Thank U!

Response:
game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        local a = Instance.new("PointLight", char.Head)
        a.Range = 17                          --Replace 15 with how far you want the glow to be (15 is probably the best)
        a.Brightness = .9                      --Replace 2 with how bright you want it to be (2 is probably the best)
        a.Color = Color3.new(255, 255, 255)   --Set the color you want it to be (Red, Green, Blue, value divided by 255)(right now it is set to white which is probably the best)
        a.Shadows = true                      --Do you want the light to be seen through bricks? (true is probably, well, the best! ;)
    end)
end)


Prompt:
--[=[
	Creates an immediately rejected Promise with the given value.

	:::caution
	Something needs to consume this rejection (i.e. `:catch()` it), otherwise it will emit an unhandled Promise rejection warning on the next frame. Thus, you should not create and store rejected Promises for later use. Only create them on-demand as needed.
	:::

	@param ... any
	@return Promise<...any>
]=]

Response:
function Promise.reject(...)
	local length, values = pack(...)
	return Promise._new(debug.traceback(nil, 2), function(_, reject)
		reject(unpack(values, 1, length))
	end)
end


Prompt: -- Map name

Response:
local MAP_CONTAINER_NAME = "Arena"
local MAP_NAME = "Map"


Prompt:
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data

Response:
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return (plrData.Character.NPCSpecifics.GaveGriefToArtie.Value == false) and (plrData.Character.NPCSpecifics.GaveFoodToArtie.Value == false)
end


Prompt: -- Important note: Precision checks currently only for 'players' and the 'localplayer', not 'parts'.


Prompt: --[[---------------- MODULES -----------------]]

Response:
--

local CIHModule = repStoreService.Game.Modules.ClientInteractionHandler
local interactables = CIHModule.Interactables
local CIH = require(CIHModule)
local BMM = require(repStoreService.Game.Modules.BuildsManagerModule)


Prompt:
--[[
    Returns true if the current state can transition to specified stateName, otherwise returns false.
]]

Response:
function StateHolder:canTransition(stateName)
	if not self._allowedTransitions[stateName] then
		Logger.error("State", stateName, "does not exist!")
		return false
	end

	for _, transitionState in pairs(self._allowedTransitions[self.current]) do
		if transitionState == stateName then
			return true
		end
	end

	return false
end

return StateHolder


Prompt: -- Load all services within 'Services':

Response: Knit.AddServicesDeep(script.Parent.Services)