Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Animation1 = Instance.new("Animation")
- LocalScript2 = Instance.new("LocalScript")
- ObjectValue3 = Instance.new("ObjectValue")
- Part4 = Instance.new("Part")
- Sound5 = Instance.new("Sound")
- Tool0.Name = "Orange Justice"
- Tool0.Parent = mas
- Tool0.TextureId = "rbxassetid://1842268307"
- Tool0.CanBeDropped = false
- Tool0.Grip = CFrame.new(0, 0, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0, 0, 0.200000003)
- Tool0.RequiresHandle = false
- Tool0.ToolTip = "It's also a great exercise move."
- Animation1.Name = "dance"
- Animation1.Parent = Tool0
- Animation1.AnimationId = "rbxassetid://1718462887"
- LocalScript2.Name = "PotionScript"
- LocalScript2.Parent = Tool0
- table.insert(cors,sandbox(LocalScript2,function()
- enabled = false
- local Tool = script.Parent;
- local dancer = nil
- local player = game.Players.LocalPlayer
- function onActivated()
- --This will check if it is enabled and then either start dancing or stop dancing
- if enabled == false then
- local humanoid = Tool.Parent:FindFirstChild("Humanoid")
- local torso = Tool.Parent:FindFirstChild("Torso")
- dancer = humanoid:LoadAnimation(Tool.dance)
- Tool.DanceObject.Value = dancer
- dancer:Play()
- Tool.dancepart.Position = player.Character.Head.Position
- Tool.dancepart.SongLoop:Play()
- enabled = true
- speed = player.Character.Humanoid.WalkSpeed
- player.Character.Humanoid.WalkSpeed = 0
- repeat
- wait(1)
- Tool.dancepart.Position = player.Character.Head.Position
- until enabled == false
- else
- dancer:Stop()
- dancer:remove()
- Tool.dancepart.SongLoop:Stop()
- enabled = false
- player.Character.Humanoid.WalkSpeed = speed
- end
- end
- function onUnequipped()
- dancer:Stop()
- dancer:remove()
- Tool.dancepart.SongLoop:Stop()
- enabled = false
- player.Character.Humanoid.WalkSpeed = speed
- end
- Tool.Activated:connect(onActivated)
- Tool.Unequipped:connect(onUnequipped)
- end))
- ObjectValue3.Name = "DanceObject"
- ObjectValue3.Parent = Tool0
- Part4.Name = "dancepart"
- Part4.Parent = Tool0
- Part4.CFrame = CFrame.new(27.8999023, 1.37002397, 0.899963021, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(27.8999023, 1.37002397, 0.899963021)
- Part4.Transparency = 1
- Part4.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part4.Anchored = true
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part4.Locked = true
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Sound5.Name = "SongLoop"
- Sound5.Parent = Part4
- Sound5.Looped = true
- Sound5.MaxDistance = 100
- Sound5.SoundId = "rbxassetid://1840761620"
- Sound5.Volume = 4
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement