Advertisement
TheYoutuber_Pro

ojihugycfhyuiok

Jan 9th, 2022
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local rp = RealPlayer
  6. script.Parent = rp.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent then
  32. for _,f in pairs(t.Functions) do
  33. f(...)
  34. end
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=rp then return end
  42. m.Target = io.Target
  43. m.Hit = io.Hit
  44. if not io.isMouse then
  45. local b = io.UserInputState == Enum.UserInputState.Begin
  46. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  47. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  48. end
  49. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  50. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  51. end
  52. for _,t in pairs(CAS.Actions) do
  53. for _,k in pairs(t.Keys) do
  54. if k==io.KeyCode then
  55. t.Function(t.Name,io.UserInputState,io)
  56. end
  57. end
  58. end
  59. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  60. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  61. end
  62. end)
  63. Event.Parent = NLS([==[
  64. local Player = game:GetService("Players").LocalPlayer
  65. local Event = script:WaitForChild("UserInput_Event")
  66.  
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76.  
  77. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86.  
  87. ----Sandboxed game object that allows the usage of client-side methods and services
  88. --Real game object
  89. local _rg = game
  90.  
  91. --Metatable for fake service
  92. local fsmt = {
  93. __index = function(self,k)
  94. local s = rawget(self,"_RealService")
  95. if s then
  96. return typeof(s[k])=="function"
  97. and function(_,...)return s[k](s,...)end or s[k]
  98. end
  99. end,
  100. __newindex = function(self,k,v)
  101. local s = rawget(self,"_RealService")
  102. if s then s[k]=v end
  103. end
  104. }
  105. local function FakeService(t,RealService)
  106. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107. return setmetatable(t,fsmt)
  108. end
  109.  
  110. --Fake game object
  111. local g = {
  112. GetService = function(self,s)
  113. return rawget(self,s) or _rg:GetService(s)
  114. end,
  115. Players = FakeService({
  116. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. RunService = FakeService({
  121. _btrs = {},
  122. RenderStepped = _rg:GetService("RunService").Heartbeat,
  123. BindToRenderStep = function(self,name,_,fun)
  124. self._btrs[name] = self.Heartbeat:Connect(fun)
  125. end,
  126. UnbindFromRenderStep = function(self,name)
  127. self._btrs[name]:Disconnect()
  128. end,
  129. },"RunService")
  130. }
  131. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  132. g.service = g.GetService
  133. FakeService(g,game)
  134. --Changing owner to fake player object to support owner:GetMouse()
  135. game,owner = g,g.Players.LocalPlayer
  136. end
  137.  
  138. wait()
  139. local plr = game.Players.LocalPlayer
  140. local char = plr.Character
  141. local m = plr:GetMouse()
  142. local Run = game:GetService("RunService")
  143. local Debris = game:GetService("Debris")
  144. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  145. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  146. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  147. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  148. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  149. local R3 = {N=Region3.new}
  150. local De = S.Debris
  151. local WS = workspace
  152. local Lght = S.Lighting
  153. local RepS = S.ReplicatedStorage
  154. local IN = Instance.new
  155. local Plrs = S.Players
  156. local Power = 0
  157. local Music = Instance.new("Sound", char.Head)
  158. Music.Looped = true
  159.  
  160. local Emit = IN("ParticleEmitter").Emit;
  161.  
  162. local Frame_Speed = 60;
  163. local WalkSpeed = 16
  164.  
  165.  
  166. --// Initializing \\--
  167. local Plr = game.Players.LocalPlayer
  168. local Char = Plr.Character
  169. local m = Plr:GetMouse()
  170. local Hum = Char:FindFirstChildOfClass'Humanoid'
  171. local RArm = Char["Right Arm"]
  172. local LArm = Char["Left Arm"]
  173. local RLeg = Char["Right Leg"]
  174. local LLeg = Char["Left Leg"]
  175. local Root = Char:FindFirstChild'HumanoidRootPart'
  176. local Torso = Char.Torso
  177. local Head = Char:WaitForChild("Head")
  178. local NeutralAnims = true
  179. local Attack = false
  180. local Debounces = {Debounces={}}
  181. local Hit = {}
  182. local Sine = 0
  183. Change = 1
  184.  
  185. Char.Animate:Destroy()
  186.  
  187.  
  188. --// CHARACTER \\--
  189.  
  190. local HeadPhone1 = Instance.new("Part", char)
  191. HeadPhone1.Size = Vector3.new(0.75, 0.812, 0.375)
  192. HeadPhone1.CFrame = char.Head.CFrame * CFrame.new(0, 0.344, 0)
  193. HeadPhone1.Anchored = true
  194. HeadPhone1.CanCollide = false
  195. HeadPhone1.BrickColor = BrickColor.new("Lime green")
  196. HeadPhone1.Material = "SmoothPlastic"
  197. local Weld = Instance.new("WeldConstraint", char)
  198. Weld.Part0 = HeadPhone1
  199. Weld.Part1 = char.Head
  200. HeadPhone1.Anchored = false
  201.  
  202. local HeadPhone2 = Instance.new("WedgePart", char)
  203. HeadPhone2.Size = Vector3.new(0.375, 0.249, 0.25)
  204. HeadPhone2.BrickColor = BrickColor.new("Lime green")
  205. HeadPhone2.CFrame = char.Head.CFrame * CFrame.new(-0.500, 0.625, 0) * CFrame.Angles(0, math.rad(90), 0)
  206. HeadPhone2.Anchored = true
  207. HeadPhone2.CanCollide = false
  208. HeadPhone2.Material = "SmoothPlastic"
  209. local Weld = Instance.new("WeldConstraint", char)
  210. Weld.Part0 = HeadPhone2
  211. Weld.Part1 = char.Head
  212. HeadPhone2.Anchored = false
  213.  
  214. local HeadPhone3 = Instance.new("WedgePart", char)
  215. HeadPhone3.BrickColor = BrickColor.new("Lime green")
  216. HeadPhone3.Size = Vector3.new(0.375, 0.249, 0.25)
  217. HeadPhone3.CFrame = char.Head.CFrame * CFrame.new(0.500, 0.625, 0) * CFrame.Angles(0, math.rad(-90), 0)
  218. HeadPhone3.Anchored = true
  219. HeadPhone3.CanCollide = false
  220. HeadPhone3.Material = "SmoothPlastic"
  221. local Weld = Instance.new("WeldConstraint", char)
  222. Weld.Part0 = HeadPhone3
  223. Weld.Part1 = char.Head
  224. HeadPhone3.Anchored = false
  225.  
  226. local HeadPhone4 = Instance.new("Part", char)
  227. HeadPhone4.BrickColor = BrickColor.new("Lime green")
  228. HeadPhone4.Size = Vector3.new(1.25, 0.562, 0.375)
  229. HeadPhone4.CFrame = char.Head.CFrame * CFrame.new(0, 0.219, 0) * CFrame.Angles(0, 0, 0)
  230. HeadPhone4.Anchored = true
  231. HeadPhone4.CanCollide = false
  232. HeadPhone4.Material = "SmoothPlastic"
  233. local Weld = Instance.new("WeldConstraint", char)
  234. Weld.Part0 = HeadPhone4
  235. Weld.Part1 = char.Head
  236. HeadPhone4.Anchored = false
  237.  
  238. local HeadPhone5 = Instance.new("Part", char)
  239. HeadPhone5.BrickColor = BrickColor.new("Lime green")
  240. HeadPhone5.Size = Vector3.new(1.406, 0.75, 0.625)
  241. HeadPhone5.Shape = "Cylinder"
  242. HeadPhone5.CFrame = char.Head.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  243. HeadPhone5.Anchored = true
  244. HeadPhone5.CanCollide = false
  245. HeadPhone5.Material = "SmoothPlastic"
  246. local Weld = Instance.new("WeldConstraint", char)
  247. Weld.Part0 = HeadPhone5
  248. Weld.Part1 = char.Head
  249. HeadPhone5.Anchored = false
  250.  
  251.  
  252. local HeadPhone6 = Instance.new("Part", char)
  253. HeadPhone6.BrickColor = BrickColor.new("Institutional white")
  254. HeadPhone6.Size = Vector3.new(1.562, 0.5, 0.417)
  255. HeadPhone6.Shape = "Cylinder"
  256. HeadPhone6.CFrame = char.Head.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  257. HeadPhone6.Anchored = true
  258. HeadPhone6.CanCollide = false
  259. HeadPhone6.Material = "SmoothPlastic"
  260. local Weld = Instance.new("WeldConstraint", char)
  261. Weld.Part0 = HeadPhone6
  262. Weld.Part1 = char.Head
  263. HeadPhone6.Anchored = false
  264.  
  265.  
  266. local RSpeaker1 = Instance.new("Part", char)
  267. RSpeaker1.BrickColor = BrickColor.new("Smoky grey")
  268. RSpeaker1.Size = Vector3.new(0.875, 0.875, 0.727)
  269. RSpeaker1.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, 0) * CFrame.Angles(0, 0, 0)
  270. RSpeaker1.Anchored = true
  271. RSpeaker1.CanCollide = false
  272. RSpeaker1.Material = "SmoothPlastic"
  273. local Weld = Instance.new("WeldConstraint", char)
  274. Weld.Part0 = RSpeaker1
  275. Weld.Part1 = char["Right Arm"]
  276. RSpeaker1.Anchored = false
  277.  
  278.  
  279. local RSpeaker2 = Instance.new("Part", char)
  280. RSpeaker2.BrickColor = BrickColor.new("Smoky grey")
  281. RSpeaker2.Size = Vector3.new(0.75, 0.875, 0.623)
  282. RSpeaker2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.188, 0) * CFrame.Angles(0, 0, 0)
  283. RSpeaker2.Anchored = true
  284. RSpeaker2.CanCollide = false
  285. RSpeaker2.Material = "SmoothPlastic"
  286. local Weld = Instance.new("WeldConstraint", char)
  287. Weld.Part0 = RSpeaker2
  288. Weld.Part1 = char["Right Arm"]
  289. RSpeaker2.Anchored = false
  290.  
  291. local RSpeaker3 = Instance.new("Part", char)
  292. RSpeaker3.BrickColor = BrickColor.new("Lime green")
  293. RSpeaker3.Shape = "Cylinder"
  294. RSpeaker3.Size = Vector3.new(0.062, 0.716, 0.716)
  295. RSpeaker3.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, -0.410) * CFrame.Angles(0, math.rad(90), 0)
  296. RSpeaker3.Anchored = true
  297. RSpeaker3.CanCollide = false
  298. RSpeaker3.Material = "SmoothPlastic"
  299. local Weld = Instance.new("WeldConstraint", char)
  300. Weld.Part0 = RSpeaker3
  301. Weld.Part1 = char["Right Arm"]
  302. RSpeaker3.Anchored = false
  303.  
  304. local RSpeaker4 = Instance.new("Part", char)
  305. RSpeaker4.BrickColor = BrickColor.new("Institutional white")
  306. RSpeaker4.Shape = "Cylinder"
  307. RSpeaker4.Size = Vector3.new(0.08, 0.716, 0.341)
  308. RSpeaker4.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, -0.418) * CFrame.Angles(0, math.rad(90), 0)
  309. RSpeaker4.Anchored = true
  310. RSpeaker4.CanCollide = false
  311. RSpeaker4.Material = "SmoothPlastic"
  312. local Weld = Instance.new("WeldConstraint", char)
  313. Weld.Part0 = RSpeaker4
  314. Weld.Part1 = char["Right Arm"]
  315. RSpeaker4.Anchored = false
  316.  
  317. local RSpeaker5 = Instance.new("Part", char)
  318. RSpeaker5.BrickColor = BrickColor.new("Lime green")
  319. RSpeaker5.Shape = "Cylinder"
  320. RSpeaker5.Size = Vector3.new(0.062, 0.614, 0.489)
  321. RSpeaker5.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.25, -0.363) * CFrame.Angles(0, math.rad(90), 0)
  322. RSpeaker5.Anchored = true
  323. RSpeaker5.CanCollide = false
  324. RSpeaker5.Material = "SmoothPlastic"
  325. local Weld = Instance.new("WeldConstraint", char)
  326. Weld.Part0 = RSpeaker5
  327. Weld.Part1 = char["Right Arm"]
  328. RSpeaker5.Anchored = false
  329.  
  330. local RSpeaker6 = Instance.new("Part", char)
  331. RSpeaker6.BrickColor = BrickColor.new("Institutional white")
  332. RSpeaker6.Shape = "Cylinder"
  333. RSpeaker6.Size = Vector3.new(0.068, 0.614, 0.239)
  334. RSpeaker6.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.25, -0.366) * CFrame.Angles(0, math.rad(90), 0)
  335. RSpeaker6.Anchored = true
  336. RSpeaker6.CanCollide = false
  337. RSpeaker6.Material = "SmoothPlastic"
  338. local Weld = Instance.new("WeldConstraint", char)
  339. Weld.Part0 = RSpeaker6
  340. Weld.Part1 = char["Right Arm"]
  341. RSpeaker6.Anchored = false
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. local LSpeaker1 = Instance.new("Part", char)
  355. LSpeaker1.BrickColor = BrickColor.new("Smoky grey")
  356. LSpeaker1.Size = Vector3.new(0.875, 0.875, 0.727)
  357. LSpeaker1.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, 0) * CFrame.Angles(0, 0, 0)
  358. LSpeaker1.Anchored = true
  359. LSpeaker1.CanCollide = false
  360. LSpeaker1.Material = "SmoothPlastic"
  361. local Weld = Instance.new("WeldConstraint", char)
  362. Weld.Part0 = LSpeaker1
  363. Weld.Part1 = char["Left Arm"]
  364. LSpeaker1.Anchored = false
  365.  
  366.  
  367. local LSpeaker2 = Instance.new("Part", char)
  368. LSpeaker2.BrickColor = BrickColor.new("Smoky grey")
  369. LSpeaker2.Size = Vector3.new(0.75, 0.875, 0.623)
  370. LSpeaker2.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.188, 0) * CFrame.Angles(0, 0, 0)
  371. LSpeaker2.Anchored = true
  372. LSpeaker2.CanCollide = false
  373. LSpeaker2.Material = "SmoothPlastic"
  374. local Weld = Instance.new("WeldConstraint", char)
  375. Weld.Part0 = LSpeaker2
  376. Weld.Part1 = char["Left Arm"]
  377. LSpeaker2.Anchored = false
  378.  
  379. local LSpeaker3 = Instance.new("Part", char)
  380. LSpeaker3.BrickColor = BrickColor.new("Lime green")
  381. LSpeaker3.Shape = "Cylinder"
  382. LSpeaker3.Size = Vector3.new(0.062, 0.716, 0.716)
  383. LSpeaker3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, -0.410) * CFrame.Angles(0, math.rad(90), 0)
  384. LSpeaker3.Anchored = true
  385. LSpeaker3.CanCollide = false
  386. LSpeaker3.Material = "SmoothPlastic"
  387. local Weld = Instance.new("WeldConstraint", char)
  388. Weld.Part0 = LSpeaker3
  389. Weld.Part1 = char["Left Arm"]
  390. LSpeaker3.Anchored = false
  391.  
  392. local LSpeaker4 = Instance.new("Part", char)
  393. LSpeaker4.BrickColor = BrickColor.new("Institutional white")
  394. LSpeaker4.Shape = "Cylinder"
  395. LSpeaker4.Size = Vector3.new(0.08, 0.716, 0.341)
  396. LSpeaker4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, -0.418) * CFrame.Angles(0, math.rad(90), 0)
  397. LSpeaker4.Anchored = true
  398. LSpeaker4.CanCollide = false
  399. LSpeaker4.Material = "SmoothPlastic"
  400. local Weld = Instance.new("WeldConstraint", char)
  401. Weld.Part0 = LSpeaker4
  402. Weld.Part1 = char["Left Arm"]
  403. LSpeaker4.Anchored = false
  404.  
  405. local LSpeaker5 = Instance.new("Part", char)
  406. LSpeaker5.BrickColor = BrickColor.new("Lime green")
  407. LSpeaker5.Shape = "Cylinder"
  408. LSpeaker5.Size = Vector3.new(0.062, 0.614, 0.489)
  409. LSpeaker5.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.25, -0.363) * CFrame.Angles(0, math.rad(90), 0)
  410. LSpeaker5.Anchored = true
  411. LSpeaker5.CanCollide = false
  412. LSpeaker5.Material = "SmoothPlastic"
  413. local Weld = Instance.new("WeldConstraint", char)
  414. Weld.Part0 = LSpeaker5
  415. Weld.Part1 = char["Left Arm"]
  416. LSpeaker5.Anchored = false
  417.  
  418. local LSpeaker6 = Instance.new("Part", char)
  419. LSpeaker6.BrickColor = BrickColor.new("Institutional white")
  420. LSpeaker6.Shape = "Cylinder"
  421. LSpeaker6.Size = Vector3.new(0.068, 0.614, 0.239)
  422. LSpeaker6.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.25, -0.366) * CFrame.Angles(0, math.rad(90), 0)
  423. LSpeaker6.Anchored = true
  424. LSpeaker6.CanCollide = false
  425. LSpeaker6.Material = "SmoothPlastic"
  426. local Weld = Instance.new("WeldConstraint", char)
  427. Weld.Part0 = LSpeaker6
  428. Weld.Part1 = char["Left Arm"]
  429. LSpeaker6.Anchored = false
  430.  
  431.  
  432. plr.Chatted:Connect(function(msg)
  433. if string.sub(msg,1,3) == "id;" then
  434. Music.SoundId = "rbxassetid://"..string.sub(msg,4)
  435. Music:Play()
  436. end
  437. end)
  438.  
  439. plr.Chatted:Connect(function(msg)
  440. if string.sub(msg,1,7) == "volume;" then
  441. Music.Volume = string.sub(msg,8)
  442. end
  443. end)
  444.  
  445.  
  446.  
  447. m.KeyDown:Connect(function(k)
  448. k:lower()
  449. if k == "f" then
  450. local SoundEX = Instance.new("Part", workspace)
  451. SoundEX.Shape = "Ball"
  452. SoundEX.Anchored = false
  453. SoundEX.BrickColor = BrickColor.new("Lime green")
  454. SoundEX.CFrame = RSpeaker1.CFrame
  455. SoundEX.Transparency = 0
  456. local SoundEX2 = Instance.new("Part", workspace)
  457. SoundEX2.Shape = "Ball"
  458. SoundEX2.Anchored = false
  459. SoundEX2.CanCollide = false
  460. SoundEX.CanCollide = false
  461. SoundEX2.BrickColor = BrickColor.new("Lime green")
  462. SoundEX2.CFrame = LSpeaker1.CFrame
  463. SoundEX2.Material = Enum.Material.ForceField
  464. SoundEX.Material = Enum.Material.ForceField
  465. SoundEX2.Transparency = 0
  466. Debris:AddItem(SoundEX, 0.5)
  467. Debris:AddItem(SoundEX2, 0.5)
  468. SoundEX.Size = Vector3.new(1, 1, 1)
  469. SoundEX2.Size = Vector3.new(1, 1, 1)
  470. wait()
  471. SoundEX.Velocity = Vector3.new(0, 0, 0)
  472. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  473. SoundEX2.Transparency = 0.1
  474. SoundEX.Transparency = 0.1
  475. SoundEX.Size = SoundEX.Size * 1.35
  476. SoundEX2.Size = SoundEX2.Size * 1.35
  477. wait()
  478. SoundEX.Velocity = Vector3.new(0, 0, 0)
  479. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  480. SoundEX.Size = SoundEX.Size * 1.35
  481. SoundEX2.Size = SoundEX2.Size * 1.35
  482. SoundEX2.Transparency = 0.2
  483. SoundEX.Transparency = 0.2
  484. wait()
  485. SoundEX.Velocity = Vector3.new(0, 0, 0)
  486. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  487. SoundEX.Size = SoundEX.Size * 1.35
  488. SoundEX2.Size = SoundEX2.Size * 1.35
  489. SoundEX2.Transparency = 0.3
  490. SoundEX.Transparency = 0.3
  491. wait()
  492. SoundEX.Velocity = Vector3.new(0, 0, 0)
  493. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  494. SoundEX.Size = SoundEX.Size * 1.35
  495. SoundEX2.Size = SoundEX2.Size * 1.35
  496. SoundEX2.Transparency = 0.4
  497. SoundEX.Transparency = 0.4
  498. wait()
  499. SoundEX.Velocity = Vector3.new(0, 0, 0)
  500. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  501. SoundEX.Size = SoundEX.Size * 1.35
  502. SoundEX2.Size = SoundEX2.Size * 1.35
  503. SoundEX2.Transparency = 0.5
  504. SoundEX.Transparency = 0.5
  505. wait()
  506. SoundEX.Velocity = Vector3.new(0, 0, 0)
  507. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  508. SoundEX.Size = SoundEX.Size * 1.35
  509. SoundEX2.Size = SoundEX2.Size * 1.35
  510. SoundEX2.Transparency = 0.6
  511. SoundEX.Transparency = 0.6
  512. wait()
  513. SoundEX.Velocity = Vector3.new(0, 0, 0)
  514. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  515. SoundEX.Size = SoundEX.Size * 1.35
  516. SoundEX2.Size = SoundEX2.Size * 1.35
  517. SoundEX2.Transparency = 0.7
  518. SoundEX.Transparency = 0.7
  519. wait()
  520. SoundEX.Velocity = Vector3.new(0, 0, 0)
  521. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  522. SoundEX.Size = SoundEX.Size * 1.35
  523. SoundEX2.Size = SoundEX2.Size * 1.35
  524. SoundEX2.Transparency = 0.8
  525. SoundEX.Transparency = 0.8
  526. wait()
  527. SoundEX.Velocity = Vector3.new(0, 0, 0)
  528. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  529. SoundEX.Size = SoundEX.Size * 1.35
  530. SoundEX2.Size = SoundEX2.Size * 1.35
  531. SoundEX2.Transparency = 0.9
  532. SoundEX.Transparency = 0.9
  533. wait()
  534. SoundEX.Velocity = Vector3.new(0, 0, 0)
  535. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  536. SoundEX.Size = SoundEX.Size * 1.35
  537. SoundEX2.Size = SoundEX2.Size * 1.35
  538. SoundEX2.Transparency = 1
  539. SoundEX.Transparency = 1
  540. dam = false
  541. SoundEX.Touched:Connect(function(s)
  542. if s.Parent:FindFirstChildOfClass("Humanoid") and s.Parent.Name ~= char.Name then
  543. if dam == false then
  544. local hit = Instance.new("Sound", s)
  545. hit.SoundId = "rbxassetid://406913243"
  546. hit:Play()
  547. s.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(10)
  548. dam = true
  549. end
  550. end
  551. end)
  552. SoundEX2.Touched:Connect(function(s)
  553. if s.Parent:FindFirstChildOfClass("Humanoid") and s.Parent.Name ~= char.Name then
  554. if dam == false then
  555. local hit = Instance.new("Sound", s)
  556. hit.SoundId = "rbxassetid://406913243"
  557. hit:Play()
  558. s.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(10)
  559. dam = true
  560. end
  561. end
  562. end)
  563. end
  564. end)
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572. --// Instance Creation Functions \\--
  573.  
  574.  
  575. function Part(parent,color,material,size,cframe,anchored,cancollide)
  576. local part = IN("Part")
  577. part.Parent = parent or Char
  578. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  579. part.Material = material or Enum.Material.SmoothPlastic
  580. part.TopSurface,part.BottomSurface=10,10
  581. part.Size = size or V3.N(1,1,1)
  582. part.CFrame = cframe or CF.N(0,0,0)
  583. part.CanCollide = cancollide or false
  584. part.Anchored = anchored or false
  585. return part
  586. end
  587.  
  588. function Weld(part0,part1,c0,c1)
  589. local weld = IN("Weld")
  590. weld.Parent = part0
  591. weld.Part0 = part0
  592. weld.Part1 = part1
  593. weld.C0 = c0 or CF.N()
  594. weld.C1 = c1 or CF.N()
  595. return weld
  596. end
  597.  
  598. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  599. local part = IN("SpecialMesh")
  600. part.MeshId = meshid or ""
  601. part.TextureId = textid or ""
  602. part.Scale = scale or V3.N(1,1,1)
  603. part.Offset = offset or V3.N(0,0,0)
  604. part.MeshType = meshtype or Enum.MeshType.Sphere
  605. part.Parent = parent
  606. return part
  607. end
  608.  
  609. NewInstance = function(instance,parent,properties)
  610. local inst = Instance.new(instance)
  611. inst.Parent = parent
  612. if(properties)then
  613. for i,v in next, properties do
  614. pcall(function() inst[i] = v end)
  615. end
  616. end
  617. return inst;
  618. end
  619.  
  620. function Clone(instance,parent,properties)
  621. local inst = instance:Clone()
  622. inst.Parent = parent
  623. if(properties)then
  624. for i,v in next, properties do
  625. pcall(function() inst[i] = v end)
  626. end
  627. end
  628. return inst;
  629. end
  630.  
  631.  
  632.  
  633.  
  634. --// Customization \\--
  635.  
  636. local DamageColor = BrickColor.new'White'
  637.  
  638. --// Stop animations \\--
  639. for _,v in next, Hum:GetPlayingAnimationTracks() do
  640. v:Stop();
  641. end
  642.  
  643. pcall(game.Destroy,Char:FindFirstChild'Animate')
  644. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  645.  
  646. --// Joints \\--
  647.  
  648. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
  649. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
  650. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
  651. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
  652. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
  653. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  654.  
  655. local LSC0 = LS.C0
  656. local RSC0 = RS.C0
  657. local NKC0 = NK.C0
  658. local LHC0 = LH.C0
  659. local RHC0 = RH.C0
  660. local RJC0 = RJ.C0
  661.  
  662. --// Artificial HB \\--
  663.  
  664. local ArtificialHB = IN("BindableEvent", script)
  665. ArtificialHB.Name = "Heartbeat"
  666.  
  667. script:WaitForChild("Heartbeat")
  668.  
  669. local tf = 0
  670. local allowframeloss = false
  671. local tossremainder = false
  672. local lastframe = tick()
  673. local frame = 1/Frame_Speed
  674. ArtificialHB:Fire()
  675.  
  676. game:GetService("RunService").Heartbeat:connect(function(s, p)
  677. tf = tf + s
  678. if tf >= frame then
  679. if allowframeloss then
  680. script.Heartbeat:Fire()
  681. lastframe = tick()
  682. else
  683. for i = 1, math.floor(tf / frame) do
  684. ArtificialHB:Fire()
  685. end
  686. lastframe = tick()
  687. end
  688. if tossremainder then
  689. tf = 0
  690. else
  691. tf = tf - frame * math.floor(tf / frame)
  692. end
  693. end
  694. end)
  695.  
  696. function swait(num)
  697. if num == 0 or num == nil then
  698. ArtificialHB.Event:wait()
  699. else
  700. for i = 0, num do
  701. ArtificialHB.Event:wait()
  702. end
  703. end
  704. end
  705.  
  706.  
  707.  
  708. mesuk = "Put id of the music here"
  709.  
  710.  
  711. while true do
  712. swait()
  713.  
  714. Sine = Sine + Change
  715.  
  716. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4)), Char)
  717.  
  718. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  719. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed > 24 and "Run" or "Walk") or hitfloor and "Idle")
  720. if(not Effects or not Effects.Parent)then
  721. Effects = IN("Model",Char)
  722. Effects.Name = "Effects"
  723. end
  724. if(State == 'Walk')then
  725. local wsVal = 20 / (Hum.WalkSpeed/16)
  726. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  727. Change = 3
  728. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  729. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  730. else
  731. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  732. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  733. end
  734.  
  735. Hum.WalkSpeed = WalkSpeed
  736.  
  737. if(NeutralAnims)then
  738. if(State == 'Idle')then
  739. local Alpha = .1
  740. Change = .75
  741. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0*M.C(Sine/12),.2*M.C(Sine/6),0)*CF.A(M.R(0*M.C(Sine/12)),0,0),Alpha)
  742. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(0*M.C(Sine/12)),0,0),Alpha)
  743. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0)*CF.A(M.R(0.01),0,M.R(-10*M.C(Sine/12))),Alpha)
  744. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0)*CF.A(M.R(0.01),0,M.R(10*M.C(Sine/12))),Alpha)
  745. LH.C0 = LH.C0:lerp(LHC0*CF.N(0*M.C(Sine/12),0*M.C(Sine/6),0)*CF.A(M.R(0*M.C(Sine/12)),M.R(7),0),Alpha)
  746. RH.C0 = RH.C0:lerp(RHC0*CF.N(0*M.C(Sine/12),0*M.C(Sine/6),0)*CF.A(M.R(0*M.C(Sine/12)),M.R(-7),0),Alpha)
  747. -- idle
  748. elseif(State == 'Run')then
  749. local wsVal = 20 / (Hum.WalkSpeed/16)
  750. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  751. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  752. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  753. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
  754. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
  755. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  756. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  757. elseif(State == 'Walk')then
  758. local wsVal = 20 / (Hum.WalkSpeed/16)
  759. local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1)
  760. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(0*M.C(Sine/wsVal)),0),Alpha)
  761. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  762. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.22*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha)
  763.  
  764. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.22*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha)
  765.  
  766. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  767. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  768. elseif(State == 'Jump')then
  769. local Alpha = .1
  770. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  771. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(5)),Alpha)
  772. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(-5)),Alpha)
  773. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  774. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  775. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  776. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  777. elseif(State == 'Fall')then
  778. local Alpha = .1
  779. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  780. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-5)+idk),Alpha)
  781. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(5)-idk),Alpha)
  782. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  783. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  784. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  785. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  786. elseif(State == 'Paralyzed')then
  787. -- paralyzed
  788. elseif(State == 'Sit')then
  789. -- sit
  790. end
  791. end
  792. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement