Advertisement
-----------------

monke spin

Mar 27th, 2021
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. local pi = math.pi
  2. print'made by derickgamerbr100'
  3. local function RBX(a)return'rbxassetid://'..a;end
  4. local function wait(a)
  5. if not a then return({game:GetService("RunService").Stepped:Wait()})[2]end
  6. local b = a
  7. while a>0 do a-=wait()end
  8. return b-a
  9. end
  10. local function ChangeIndex(a,b,c)
  11. for d,e in next,b do
  12. local f = pcall(function()a[d]=e;end)
  13. if c and not f then print('bad index',a,d,e)end
  14. end
  15. end
  16. local function Create(a)return function(b)local c = Instance.new(a)ChangeIndex(c,b,1)return c;end;end
  17. local assert = function(a,b,c)assert(a,b or('Bad argument'..(c or 1)))end
  18.  
  19.  
  20. local function MonkeyCircle(Player,MonkeyInstance,Offset,SongID,MonkeyAmount,Speed)
  21. Player,Offset,SongID,MonkeyAmount,Speed=Player or getfenv(2).owner,Offset or CFrame.new(0,0,-6.5),SongID or
  22. 4066896895,MonkeyAmount or 6,Speed or .1
  23. local Character = Player.Character;assert(Character)local HUM = Character:FindFirstChildWhichIsA'Humanoid'
  24. local HRP = Character:FindFirstChild'HumanoidRootPart'assert(HRP and HUM,nil,2)
  25. if not MonkeyInstance then
  26. MonkeyInstance = Create'Part'{Parent=game:GetService("Lighting")}
  27. Create'SpecialMesh'{MeshId=RBX(5265943271);TextureId=RBX(5265943300);Parent=MonkeyInstance}
  28. end
  29. MonkeyInstance.CanCollide = false
  30. Create'Sound'{Parent=HRP;SoundId=RBX(SongID);Volume=3;Looped=true}:Play()
  31. local Monkeys = {}
  32. for a=1,MonkeyAmount do
  33. local b = MonkeyInstance:Clone()
  34. b.Parent = workspace
  35. Create'Weld'{Parent=b;Name='a';Part0=b;Part1=HRP;C1=CFrame.Angles(0,pi*2*a/MonkeyAmount,0);C0=Offset}
  36. table.insert(Monkeys,b)
  37. end
  38. while wait()do
  39. for _,a in next,Monkeys do
  40. a.a.C0*= CFrame.Angles(0,Speed,0)
  41. end
  42. end
  43. end
  44.  
  45. MonkeyCircle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement