Last active
July 30, 2024 21:44
-
-
Save mrsprinkler/8b1ed607601f4b40f61cc4288da69ba5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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