Advertisement
Guest User

End me pls

a guest
Jun 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Animation1 = Instance.new("Animation")
  21. LocalScript2 = Instance.new("LocalScript")
  22. ObjectValue3 = Instance.new("ObjectValue")
  23. Part4 = Instance.new("Part")
  24. Sound5 = Instance.new("Sound")
  25. Tool0.Name = "Orange Justice"
  26. Tool0.Parent = mas
  27. Tool0.TextureId = "rbxassetid://1842268307"
  28. Tool0.GripPos = Vector3.new(0, 0, 0.200000003)
  29. Tool0.ToolTip = "It's also a great exercise move."
  30. Tool0.CanBeDropped = false
  31. Animation1.Name = "dance"
  32. Animation1.Parent = Tool0
  33. Animation1.AnimationId = "rbxassetid://1985850476"
  34. LocalScript2.Name = "PotionScript"
  35. LocalScript2.Parent = Tool0
  36. table.insert(cors,sandbox(LocalScript2,function()
  37. enabled = false
  38. local Tool = script.Parent;
  39. local dancer = nil
  40. local player = game.Players.LocalPlayer
  41.  
  42.  
  43.  
  44. function onActivated()
  45.  
  46.  
  47. --This will check if it is enabled and then either start dancing or stop dancing
  48. if enabled == false then
  49. local humanoid = Tool.Parent:FindFirstChild("Humanoid")
  50. local torso = Tool.Parent:FindFirstChild("Torso")
  51.  
  52. dancer = humanoid:LoadAnimation(Tool.dance)
  53. Tool.DanceObject.Value = dancer
  54. dancer:Play()
  55. Tool.dancepart.Position = player.Character.Head.Position
  56. Tool.dancepart.SongLoop:Play()
  57. enabled = true
  58. speed = player.Character.Humanoid.WalkSpeed
  59. player.Character.Humanoid.WalkSpeed = 0
  60. repeat
  61. wait(1)
  62. Tool.dancepart.Position = player.Character.Head.Position
  63. until enabled == false
  64.  
  65. else
  66. dancer:Stop()
  67. dancer:remove()
  68. Tool.dancepart.SongLoop:Stop()
  69. enabled = false
  70. player.Character.Humanoid.WalkSpeed = speed
  71. end
  72. end
  73.  
  74. function onUnequipped()
  75. dancer:Stop()
  76. dancer:remove()
  77. Tool.dancepart.SongLoop:Stop()
  78. enabled = false
  79. player.Character.Humanoid.WalkSpeed = speed
  80. end
  81.  
  82. Tool.Activated:connect(onActivated)
  83. Tool.Unequipped:connect(onUnequipped)
  84.  
  85. end))
  86. ObjectValue3.Name = "DanceObject"
  87. ObjectValue3.Parent = Tool0
  88. Part4.Name = "dancepart"
  89. Part4.Parent = Tool0
  90. Part4.Transparency = 1
  91. Part4.Anchored = true
  92. Part4.CanCollide = false
  93. Part4.Locked = true
  94. Part4.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  95. Part4.CFrame = CFrame.new(-2.80009794, 1.37004995, 0.999970019, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  96. Part4.BottomSurface = Enum.SurfaceType.Smooth
  97. Part4.TopSurface = Enum.SurfaceType.Smooth
  98. Part4.Position = Vector3.new(-2.80009794, 1.37004995, 0.999970019)
  99. Sound5.Name = "SongLoop"
  100. Sound5.Parent = Part4
  101. Sound5.SoundId = "rbxassetid://1840761620"
  102. Sound5.Volume = 4
  103. Sound5.Looped = true
  104. for i,v in pairs(mas:GetChildren()) do
  105. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  106. pcall(function() v:MakeJoints() end)
  107. end
  108. mas:Destroy()
  109. for i,v in pairs(cors) do
  110. spawn(function()
  111. pcall(v)
  112. end)
  113. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement