Advertisement
HenloMyDude

take a chance (unfinished)

Dec 30th, 2019
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.04 KB | None | 0 0
  1.  
  2. --by youngmacka123--
  3.  
  4. script.Parent = owner.Character
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. local RealPlayer = Player
  8. do print("hi")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end;print'by youngmacka123 aka makaroni'
  9.  
  10. plr = owner
  11. char = plr.Character
  12. ra = char["Right Arm"]
  13. la = char["Left Arm"]
  14. hed = char.Head
  15. root = char.HumanoidRootPart
  16. hum = char.Humanoid
  17. dancin = false
  18.  
  19. clerp = function(toclerp, cf, number)
  20. local joint = toclerp
  21. joint.C0 = joint.C0:Lerp(cf, number)
  22. end
  23.  
  24. clerp2 = function(toclerp, cf)
  25. local joint = toclerp
  26. joint.C0 = cf
  27. end
  28.  
  29. clerp3 = function(toclerp, cf, number)
  30. local joint = toclerp
  31. joint.C1 = joint.C1:Lerp(cf, number)
  32. end
  33.  
  34. Swait,swait = function(number)
  35. if number == 0 or number == nil then
  36. game:GetService("RunService").Heartbeat:Wait()
  37. else
  38. for i = 1,number do
  39. game:GetService("RunService").Heartbeat:Wait()
  40. end
  41. end
  42. end
  43.  
  44. ezweld = function(p, a, b, cf)
  45. local weld = Instance.new("Weld",p)
  46. weld.Part0 = a
  47. weld.Part1 = b
  48. weld.C0 = cf
  49. return weld
  50. end
  51.  
  52. NewSound = function(p, id, pit, vol, loop)
  53. local Sound = Instance.new("Sound",p)
  54. Sound.Pitch = pit
  55. Sound.Volume = vol
  56. Sound.SoundId = "rbxassetid://" ..id
  57. Sound.Looped = loop
  58. Sound:Play()
  59. return Sound
  60. end
  61.  
  62. IT = Instance.new
  63. Rad = math.rad
  64. Cos = math.cos
  65. Sin = math.sin
  66. BrickC = BrickColor.new
  67. C3 = Color3.new
  68. VT = Vector3.new
  69.  
  70. anim = "Idle"
  71. attack = false
  72. local RS = char.Torso["Right Shoulder"]
  73. local LS = char.Torso["Left Shoulder"]
  74. local RH = char.Torso["Right Hip"]
  75. local LH = char.Torso["Left Hip"]
  76. local neck = char.Torso["Neck"]
  77. local anim = "Idle"
  78. local animate = char.Animate
  79. local root = char.HumanoidRootPart
  80. local rootj = root.RootJoint
  81. local timepos = 0
  82. local sine = 0
  83. local RSnor = RS.C0
  84. local LSnor = LS.C0
  85. local RHnor = RH.C0
  86. local LHnor = LH.C0
  87. local RSnor2 = RS.C1
  88. local LSnor2 = LS.C1
  89. local RHnor2 = RH.C1
  90. local LHnor2 = LH.C1
  91. local rootjnor = rootj.C0
  92. local necknor = neck.C0
  93. local tors = char.Torso
  94. hum.Animator:remove()
  95. mouse = plr:GetMouse()
  96. hold = false
  97. Debris = game:GetService("Debris")
  98.  
  99. local dustp = Instance.new("Part",char)
  100. dustp.Transparency = 1
  101. dustp.Size = Vector3.new(0.1, 0.1, 0.1)
  102. dustp.CanCollide = false
  103. dustp.Locked = true
  104. local dustj = ezweld(char, root, dustp, CFrame.new(0, -tors.Size.y - 0.5, 0))
  105. local dust = Instance.new("ParticleEmitter",dustp)
  106. dust.Rate = 3
  107. dust.Lifetime = NumberRange.new(0.35)
  108. dust.Texture = "rbxassetid://420061161"
  109. dust.Speed = NumberRange.new(2)
  110. dust.EmissionDirection = "Back"
  111. dust.Rotation = NumberRange.new(155)
  112. dust.RotSpeed = NumberRange.new(15)
  113. dust.Enabled = false
  114. dust.Size = NumberSequence.new(tors.Size.y - 1.5, tors.Size.y - 0.75)
  115. dust.Transparency = NumberSequence.new(0.25, 1)
  116. sped = 16
  117. hee = 15
  118. ae = false
  119. emrad = 0
  120.  
  121. function RayCast(Position, Direction, Range, Ignore)
  122. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  123. end
  124.  
  125. for i,v in pairs (char:GetChildren()) do
  126. if v:IsA("Hat") or v:IsA("Accessory") or v:IsA("ShirtGraphic") or v:IsA("Shirt") or v:IsA("Pants") then
  127. v:remove()
  128. end
  129. if v:IsA("Part") then
  130. v.Color = Color3.new(1, 1, 1)
  131. end
  132. end
  133.  
  134. function addpart(p, size, trans, collide, anchor, color, bc, mat)
  135. local part = Instance.new("Part", p)
  136. part.Size = size
  137. part.Transparency = trans
  138. part.CanCollide = collide
  139. part.Anchored = anchor
  140. part.Material = mat
  141. if bc then
  142. part.BrickColor = BrickColor.new(color)
  143. else
  144. part.Color = color
  145. end
  146. return part
  147. end
  148.  
  149. function addmesh(p, scale, t, msh, txt)
  150. local mesh = Instance.new("SpecialMesh", p)
  151. mesh.Scale = scale
  152. mesh.MeshType = t
  153. if t == "FileMesh" then
  154. mesh.MeshId = "rbxassetid://" ..msh
  155. mesh.TextureId = "rbxassetid://" ..txt
  156. end
  157. end
  158.  
  159. local accessory = addpart(char, Vector3.new(2, 1.6, 2), 0, false, false, "Grey", true, "Plastic")
  160. local mesh = addmesh(accessory, Vector3.new(1, 1, 1), "FileMesh", 11144636, 11144632)
  161. local weld = ezweld(char, accessory, hed, CFrame.new(0, -0.9775, 0))
  162. local hat2 = addpart(char, Vector3.new(2, 1.6, 2), 1, false, false, "Grey", true, "Plastic")
  163. local mesh = addmesh(hat2, Vector3.new(1, 1, 1), "FileMesh", 11144636, 11144632)
  164. local weld2 = ezweld(char, hat2, ra, CFrame.new(0, 1.65, 0))
  165. local shirt = Instance.new("Shirt", char)
  166. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=11192464"
  167. local pants = Instance.new("Pants", char)
  168. pants.PantsTemplate = "http://www.roblox.com/asset/?id=11192327"
  169. local music = NewSound(hed, 1234043017, 1, 10, true)
  170. music.Name = "musicthatneedstobevisualizedayee"
  171. local smug = false
  172. cn = CFrame.new
  173. angles = CFrame.Angles
  174.  
  175. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  176. local NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  177.  
  178. local loudness = 0
  179. local remote = Instance.new("RemoteEvent", char)
  180. remote.Name = "localsound"
  181.  
  182. local client = NLS([[
  183.  
  184. plr = owner
  185. char = plr.Character
  186. hed = char.Head
  187. song = hed.musicthatneedstobevisualizedayee
  188. remote = char.localsound
  189.  
  190. while true do
  191. game:GetService("RunService").Heartbeat:Wait()
  192. remote:FireServer(song.PlaybackLoudness / 3)
  193. end
  194.  
  195. ]], char)
  196.  
  197. remote.OnServerEvent:connect(function(_,loud)
  198. loudness = loud
  199. end)
  200.  
  201. smug = false
  202.  
  203. function smuggy()
  204. if smug then
  205. smug = false
  206. RS.C1 = RSnor2
  207. LS.C1 = LSnor2
  208. RH.C1 = RHnor2
  209. LH.C1 = LHnor2
  210. else
  211. local sinno = 0
  212. RS.C1 = cn(0, 0.5, 0)
  213. LS.C1 = cn(0, 0.5, 0)
  214. RH.C1 = cn(0, 1, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  215. LH.C1 = cn(0, 1, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  216. attack = true
  217. smug = true
  218. repeat
  219. Swait()
  220. sinno = sinno + loudness / 75 + 0.15
  221. clerp(rootj, RootCF*CFrame.new(0+(.75*math.cos(sinno/8)),0+(.2*math.sin(sinno/16)),-.25+(-.1*math.cos(sinno/4)))*angles(math.rad(-10-10*math.sin(sinno/16)),math.rad(0),math.rad(0+(20*math.sin(sinno/8)))), 0.3)
  222. clerp(neck, NeckCF*CFrame.new(0,0,0)*angles(math.rad(20*math.sin(sinno/16)),math.rad(0),math.rad(0-(20*math.sin(sinno/32)))), 0.3)
  223. clerp(RH, CFrame.new(.5, -.9+.1*math.cos(sinno/4), -.1-.1*math.cos(sinno/4))*angles(math.rad(-10-(10*math.sin(sinno/16))-(5*math.sin(sinno/8)) ),math.rad(-20+(-20*math.sin(sinno/8))),math.rad(10+(20*math.cos(sinno/8)))), 0.3)
  224. clerp(LH, CFrame.new(-.5, -.9+.1*math.cos(sinno/4), -.1-.1*math.cos(sinno/4))*angles(math.rad(-10-(10*math.sin(sinno/16))+(5*math.sin(sinno/8)) ),math.rad(20+(-20*math.sin(sinno/8))),math.rad(-10+(20*math.cos(sinno/8)))), 0.3)
  225. clerp(RS, CFrame.new(1.5 , 0.5, -.0)*angles(math.rad(120+(-20*math.cos(sinno/8))+(-20*math.sin(sinno/16))),math.rad(0),math.rad(25+(25*math.cos(sinno/8)) )), 0.3)
  226. clerp(LS, CFrame.new(-1.5, 0.5, -.0)*angles(math.rad(120+(20*math.cos(sinno/8))+(-20*math.sin(sinno/16))),math.rad(0),math.rad(-25+(25*math.cos(sinno/8)))), 0.3)
  227. until smug == false
  228. smug = false
  229. attack = false
  230. end
  231. end
  232.  
  233. function wave()
  234. attack = true
  235. for i = 1,45 do
  236. Swait()
  237. sped = 0
  238. dust.Enabled = false
  239. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.15 * Cos(sine / 12)), 0.3)
  240. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(0)), 0.3)
  241. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  242. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  243. clerp(RS, RSnor * CFrame.new(0, 0.5, 0) * CFrame.Angles(Rad(15 + 25 * Cos(sine / 5)), Rad(0), Rad(180)), 0.3)
  244. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-11 - 5 * Sin(sine / 12)), Rad(3), 0), 0.3)
  245. end
  246. attack = false
  247. end
  248.  
  249. function dropdice()
  250. attack = true
  251. local dice = Instance.new("Part", workspace)
  252. dice.Name = "dice" ..plr.Name
  253. dice.Size = Vector3.new(1, 0.95, 1)
  254. dice.CanCollide = false
  255. local mesh = addmesh(dice, Vector3.new(0.02, 0.02, 0.02), "FileMesh", 3717997607, 4557756121)
  256. local weld = ezweld(char, dice, ra, CFrame.new(0, ra.Size.y / 2 + 0.25, 0))
  257. for i = 1,12 do
  258. Swait()
  259. sped = 0
  260. dust.Enabled = false
  261. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.15 * Cos(sine / 12)), 0.3)
  262. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(25)), 0.3)
  263. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  264. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  265. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(90)), 0.3)
  266. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-11 - 5 * Sin(sine / 12)), Rad(3), 0), 0.3)
  267. end
  268. weld:remove()
  269. dice.CanCollide = true
  270. attack = false
  271. end
  272.  
  273. local a = math.huge
  274. function nograv(part)
  275. local vel = Instance.new("BodyVelocity", part)
  276. vel.MaxForce = Vector3.new(a, a, a)
  277. vel.Velocity = Vector3.new(0, 0, 0)
  278. return vel
  279. end
  280.  
  281. rl = char["Right Leg"]
  282. ll = char["Left Leg"]
  283. function kickdice()
  284. attack = true
  285. for i = 1,25 do
  286. Swait()
  287. sped = 0
  288. dust.Enabled = false
  289. clerp(rootj, rootjnor * CFrame.new(0, 0, -0.25 + 0.15 * Cos(sine / 12)) * CFrame.Angles(Rad(45), 0, Rad(0)), 0.3)
  290. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(0)), 0.3)
  291. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), Rad(-45)) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  292. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), Rad(-45)) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  293. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-45)), 0.3)
  294. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(45)), 0.3)
  295. end
  296. local detect = addpart(char, rl.Size, 1, false, false, "Grey", true, "Plastic")
  297. detect.Locked = true
  298. local grav = nograv(detect)
  299. local kicked = false
  300. local hitbox = detect.Touched:connect(function(hit)
  301. if hit.Name == "dice" ..plr.Name and kicked == false then
  302. kicked = true
  303. hit.Velocity = rl.CFrame.lookVector * 150
  304. end
  305. end)
  306. for i = 1,25 do
  307. Swait()
  308. sped = 0
  309. detect.CFrame = rl.CFrame
  310. dust.Enabled = false
  311. clerp(rootj, rootjnor * CFrame.new(0, 0, -0.25 + 0.15 * Cos(sine / 12)) * CFrame.Angles(Rad(-45), 0, Rad(0)), 0.3)
  312. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(0)), 0.3)
  313. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), Rad(45)) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  314. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), Rad(45)) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  315. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-45)), 0.3)
  316. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(45)), 0.3)
  317. end
  318. detect:remove()
  319. hitbox:disconnect()
  320. attack = false
  321. end
  322.  
  323. local stolen = nil
  324. local caught = {}
  325. local gottem = false
  326. local yus = Instance.new("NumberValue", nil)
  327. function catchinhat()
  328. if stolen == nil then
  329. attack = true
  330. accessory.Transparency = 1
  331. hat2.Transparency = 0
  332. for i = 1,45 do
  333. Swait()
  334. sped = 0
  335. dust.Enabled = false
  336. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.15 * Cos(sine / 12)) * CFrame.Angles(Rad(0), 0, Rad(25)), 0.3)
  337. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(-25)), 0.3)
  338. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  339. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  340. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(90)), 0.3)
  341. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-11 - 5 * Sin(sine / 12)), Rad(3), 0), 0.3)
  342. end
  343. if mouse.Target then
  344. if mouse.Target.Parent then
  345. local dud = mouse.Target.Parent
  346. if dud and dud ~= workspace then
  347. local torso = dud:FindFirstChild("Torso") or dud:FindFirstChild("UpperTorso")
  348. if torso then
  349. for i = 1,75 do
  350. Swait()
  351. torso.Anchored = true
  352. torso.CFrame = torso.CFrame:lerp(hat2.CFrame, 0.075)
  353. sped = 0
  354. dust.Enabled = false
  355. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.15 * Cos(sine / 12)) * CFrame.Angles(Rad(0), 0, Rad(25)), 0.3)
  356. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(-25)), 0.3)
  357. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  358. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  359. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(90)), 0.3)
  360. end
  361. torso.Anchored = false
  362. end
  363. local stolen = dud
  364. yus.Parent = stolen
  365. gottem = true
  366. for i,v in pairs (stolen:children()) do
  367. if v:IsA("Hat") or v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("ShirtGraphic") or v:IsA("Pants") or v:IsA("Part") or v:IsA("MeshPart") or v:IsA("Humanoid") then
  368. table.insert(caught, v)
  369. v.Parent = nil
  370. end
  371. end
  372. end
  373. end
  374. end
  375. hat2.Transparency = 1
  376. accessory.Transparency = 0
  377. attack = false
  378. end
  379. return stolen
  380. end
  381.  
  382. function release(cf)
  383. if yus.Parent ~= nil then
  384. local stolen = yus.Parent
  385. if stolen ~= nil then
  386. gottem = false
  387. for i = 1,#caught do
  388. if caught[i] ~= nil then
  389. caught[i].Parent = stolen
  390. if caught[i].ClassName == "Part" or caught[i].ClassName == "MeshPart" then
  391. caught[i].CFrame = hat2.CFrame
  392. end
  393. end
  394. end
  395. else
  396. gottem = false
  397. end
  398. stolen = nil;caught = {}
  399. end
  400. end
  401.  
  402. mouse.KeyDown:connect(function(key)
  403. if key == "t" then
  404. wave()
  405. end
  406. if key == "y" then
  407. smuggy()
  408. end
  409. if key == "e" then
  410. dropdice()
  411. end
  412. if key == "r" then
  413. kickdice()
  414. end
  415. if key == "v" then
  416. if gottem == false then
  417. catchinhat()
  418. else
  419. release(hat2.CFrame)
  420. end
  421. end
  422. end)
  423.  
  424. print('by youngmacka123')
  425. while true do
  426. Swait()
  427. music.Playing = true
  428. music.SoundId = "rbxassetid://1234043017"
  429. music.Volume = 5
  430. music.Looped = true
  431. sine = sine + 1
  432. hum.JumpPower = 45
  433. hum.WalkSpeed = sped
  434. local TiltVelocity = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity/1.6))
  435. local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
  436. local WALKSPEEDVALUE = 7 / (hum.WalkSpeed / 17)
  437. torsverticalvel = root.Velocity.y
  438. hitfloor = RayCast(root.Position, (CFrame.new(root.Position, root.Position + Vector3.new(0, -1, 0))).lookVector, tors.Size.y+2+hum.HipHeight, char)
  439. if TORSOVELOCITY < 1 and hitfloor ~= nil then
  440. anim = "Idle"
  441. if attack == false then
  442. sped = 10
  443. dust.Enabled = false
  444. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.15 * Cos(sine / 12)), 0.3)
  445. clerp(neck, necknor * CFrame.Angles(Rad(0 + 3 * Cos(sine / (12 / 1))), 0, Rad(0)), 0.3)
  446. clerp(RH, RHnor * CFrame.Angles(Rad(-4), Rad(-4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  447. clerp(LH, LHnor * CFrame.Angles(Rad(-4), Rad(4), 0) * CFrame.new(0, -0.15 * Cos(sine / 12), 0), 0.3)
  448. clerp(RS, RSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-11 - 5 * Sin(sine / 12)), Rad(-3), 0), 0.3)
  449. clerp(LS, LSnor * CFrame.new(0, -0.05, 0) * CFrame.Angles(Rad(-11 - 5 * Sin(sine / 12)), Rad(3), 0), 0.3)
  450. end
  451. elseif TORSOVELOCITY > 1 and hitfloor ~= nil then
  452. anim = "Walk"
  453. if attack == false then
  454. sped = 16
  455. dust.Enabled = false
  456. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.05 * Cos(sine / (WALKSPEEDVALUE + 15))) * CFrame.Angles(-Rad(TiltVelocity.z) + Rad(TiltVelocity.z / 3) * Sin(sine / (WALKSPEEDVALUE / 2)) * 1, Rad(0) -Rad(TiltVelocity.x) + Rad(TiltVelocity.x / 8) * Sin(sine / (WALKSPEEDVALUE / 2)) * 0.4 + root.Velocity.y / 35, 0), 0.3)
  457. clerp(neck, necknor * CFrame.Angles(Rad(TiltVelocity.z) - Rad(TiltVelocity.z / 3) * Sin(sine / (WALKSPEEDVALUE / 2)) * 1, hed.Velocity.y / 35, 0), 0.3)
  458. clerp(RH, RHnor * CFrame.new(0 + 0.025 * Sin(sine / (WALKSPEEDVALUE / 1)), 0.05 + 0.1 * Sin(sine / (WALKSPEEDVALUE / 2)), 0) * CFrame.Angles(Rad(0 - 25 * math.sin(sine / WALKSPEEDVALUE)*math.rad(TiltVelocity.x)*5.5), Rad(0), Rad(hee * Cos(sine / WALKSPEEDVALUE)) + 0 + Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10) * CFrame.new(0, -0.025 * Cos(sine / 12), 0), 0.3)
  459. clerp(LH, LHnor * CFrame.new(0 + 0.025 * Sin(sine / (WALKSPEEDVALUE / 1)), 0.05 + 0.1 * Sin(sine / (WALKSPEEDVALUE / 2)), 0) * CFrame.Angles(Rad(0 - 25 * math.sin(sine / WALKSPEEDVALUE)*math.rad(TiltVelocity.x)*5.5), Rad(0), Rad(hee * Cos(sine / WALKSPEEDVALUE)) + 0 + Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10) * CFrame.new(0, -0.025 * Cos(sine / 12), 0), 0.3)
  460. clerp(RS, RSnor * CFrame.Angles(Rad(0), 0, Rad(-hee * Cos(sine / WALKSPEEDVALUE)) - 0 + -Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10), 0.3)
  461. clerp(LS, LSnor * CFrame.Angles(Rad(0), 0, Rad(-hee * Cos(sine / WALKSPEEDVALUE)) - 0 + -Sin(sine / WALKSPEEDVALUE) / 2.5 * -Rad(TiltVelocity.z) * 10), 0.3)
  462. end
  463. elseif torsverticalvel > 0.05 and hitfloor == nil then
  464. anim = "Jump"
  465. if attack == false then
  466. sped = 16
  467. dust.Enabled = false
  468. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.1 * Cos(sine / (WALKSPEEDVALUE + 15))) * CFrame.Angles(Rad(5), 0, 0), 0.3)
  469. clerp(neck, necknor * CFrame.Angles(Rad(-5), 0, 0), 0.3)
  470. clerp(RH, RHnor * CFrame.Angles(Rad(-6), Rad(-15), Rad(-20)) * CFrame.new(0, -0.1 * Cos(sine / (WALKSPEEDVALUE + 15)), 0), 0.3)
  471. clerp(LH, LHnor * CFrame.Angles(Rad(-6), Rad(15), Rad(20)) * CFrame.new(0, -0.1 * Cos(sine / (WALKSPEEDVALUE + 15)), 0), 0.3)
  472. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(20 + 6 * math.sin(sine / 12)), 0, Rad(160)), 0.3)
  473. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(20 + 6 * math.sin(sine / 12)), 0, Rad(-160)), 0.3)
  474. end
  475. elseif torsverticalvel < 0.05 and hitfloor == nil then
  476. anim = "Fall"
  477. if attack == false then
  478. sped = 16
  479. dust.Enabled = false
  480. clerp(rootj, rootjnor * CFrame.new(0, 0, 0.1 * Cos(sine / 12)) * CFrame.Angles(Rad(-5), 0, 0), 0.3)
  481. clerp(neck, necknor * CFrame.Angles(Rad(25), 0, 0), 0.3)
  482. clerp(RH, RHnor * CFrame.Angles(Rad(-6), Rad(-15), Rad(25)) * CFrame.new(0, -0.1 * Cos(sine / 12), 0), 0.3)
  483. clerp(LH, LHnor * CFrame.Angles(Rad(-6), Rad(15), Rad(-25)) * CFrame.new(0, -0.1 * Cos(sine / 12), 0), 0.3)
  484. clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, Rad(35)), 0.3)
  485. clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, Rad(-35)), 0.3)
  486. end
  487. end
  488. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement