Skip to content

Instantly share code, notes, and snippets.

@mrsprinkler
Last active July 30, 2024 21:44
Show Gist options
  • Select an option

  • Save mrsprinkler/8b1ed607601f4b40f61cc4288da69ba5 to your computer and use it in GitHub Desktop.

Select an option

Save mrsprinkler/8b1ed607601f4b40f61cc4288da69ba5 to your computer and use it in GitHub Desktop.
local plr = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
function GetChar()
return plr.Character
end
function spin()
local stop = false
local function StopFunction()
stop = true
end
local function run()
repeat
local humanoidRootPart = GetChar().HumanoidRootPart
local currentCFrame = humanoidRootPart.CFrame
local deltaRotation = CFrame.Angles(0, 1, 0)
humanoidRootPart.CFrame = currentCFrame * deltaRotation
task.wait()
until stop
end
task.spawn(run)
return StopFunction
end
local StopFunction = spin()
print(1)
for _,child in workspace:GetChildren() do
if child.Name=="Chest1" or child.Name=="Chest2" or child.Name=="Chest3" then
repeat
GetChar().HumanoidRootPart.Position = child.Position+Vector3.new(0,0.09,0)
task.wait(.05)
until not child.Parent
end
end
StopFunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment