Guest User

Untitled

a guest
Jun 19th, 2020
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.15 KB | None | 0 0
  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. if char:FindFirstChildOfClass("Accessory") then
  166. char:FindFirstChildOfClass("Accessory"):Destroy()
  167. end
  168.  
  169. if char:FindFirstChildOfClass("Accessory") then
  170. char:FindFirstChildOfClass("Accessory"):Destroy()
  171. end
  172.  
  173. if char:FindFirstChildOfClass("Accessory") then
  174. char:FindFirstChildOfClass("Accessory"):Destroy()
  175. end
  176.  
  177. if char:FindFirstChildOfClass("Accessory") then
  178. char:FindFirstChildOfClass("Accessory"):Destroy()
  179. end
  180.  
  181. if char:FindFirstChildOfClass("Accessory") then
  182. char:FindFirstChildOfClass("Accessory"):Destroy()
  183. end
  184.  
  185. if char:FindFirstChildOfClass("Accessory") then
  186. char:FindFirstChildOfClass("Accessory"):Destroy()
  187. end
  188.  
  189. if char:FindFirstChildOfClass("Accessory") then
  190. char:FindFirstChildOfClass("Accessory"):Destroy()
  191. end
  192.  
  193. if char:FindFirstChildOfClass("Accessory") then
  194. char:FindFirstChildOfClass("Accessory"):Destroy()
  195. end
  196.  
  197. if char:FindFirstChildOfClass("Accessory") then
  198. char:FindFirstChildOfClass("Accessory"):Destroy()
  199. end
  200.  
  201. if char:FindFirstChildOfClass("Accessory") then
  202. char:FindFirstChildOfClass("Accessory"):Destroy()
  203. end
  204.  
  205. if char:FindFirstChildOfClass("Accessory") then
  206. char:FindFirstChildOfClass("Accessory"):Destroy()
  207. end
  208.  
  209. if char:FindFirstChildOfClass("Accessory") then
  210. char:FindFirstChildOfClass("Accessory"):Destroy()
  211. end
  212.  
  213. --// Initializing \\--
  214. local Plr = game.Players.LocalPlayer
  215. local Char = Plr.Character
  216. local m = Plr:GetMouse()
  217. local Hum = Char:FindFirstChildOfClass'Humanoid'
  218. local RArm = Char["Right Arm"]
  219. local LArm = Char["Left Arm"]
  220. local RLeg = Char["Right Leg"]
  221. local LLeg = Char["Left Leg"]
  222. local Root = Char:FindFirstChild'HumanoidRootPart'
  223. local Torso = Char.Torso
  224. local Head = Char:WaitForChild("Head")
  225. local NeutralAnims = true
  226. local Attack = false
  227. local Debounces = {Debounces={}}
  228. local Hit = {}
  229. local Sine = 0
  230. Change = 1
  231.  
  232. Char.Animate:Destroy()
  233.  
  234.  
  235. --// CHARACTER \\--
  236.  
  237. local HeadPhone1 = Instance.new("Part", char)
  238. HeadPhone1.Size = Vector3.new(0.75, 0.812, 0.375)
  239. HeadPhone1.CFrame = char.Head.CFrame * CFrame.new(0, 0.344, 0)
  240. HeadPhone1.Anchored = true
  241. HeadPhone1.CanCollide = false
  242. HeadPhone1.BrickColor = BrickColor.new("Lime green")
  243. HeadPhone1.Material = "SmoothPlastic"
  244. local Weld = Instance.new("WeldConstraint", char)
  245. Weld.Part0 = HeadPhone1
  246. Weld.Part1 = char.Head
  247. HeadPhone1.Anchored = false
  248.  
  249. local HeadPhone2 = Instance.new("WedgePart", char)
  250. HeadPhone2.Size = Vector3.new(0.375, 0.249, 0.25)
  251. HeadPhone2.BrickColor = BrickColor.new("Lime green")
  252. HeadPhone2.CFrame = char.Head.CFrame * CFrame.new(-0.500, 0.625, 0) * CFrame.Angles(0, math.rad(90), 0)
  253. HeadPhone2.Anchored = true
  254. HeadPhone2.CanCollide = false
  255. HeadPhone2.Material = "SmoothPlastic"
  256. local Weld = Instance.new("WeldConstraint", char)
  257. Weld.Part0 = HeadPhone2
  258. Weld.Part1 = char.Head
  259. HeadPhone2.Anchored = false
  260.  
  261. local HeadPhone3 = Instance.new("WedgePart", char)
  262. HeadPhone3.BrickColor = BrickColor.new("Lime green")
  263. HeadPhone3.Size = Vector3.new(0.375, 0.249, 0.25)
  264. HeadPhone3.CFrame = char.Head.CFrame * CFrame.new(0.500, 0.625, 0) * CFrame.Angles(0, math.rad(-90), 0)
  265. HeadPhone3.Anchored = true
  266. HeadPhone3.CanCollide = false
  267. HeadPhone3.Material = "SmoothPlastic"
  268. local Weld = Instance.new("WeldConstraint", char)
  269. Weld.Part0 = HeadPhone3
  270. Weld.Part1 = char.Head
  271. HeadPhone3.Anchored = false
  272.  
  273. local HeadPhone4 = Instance.new("Part", char)
  274. HeadPhone4.BrickColor = BrickColor.new("Lime green")
  275. HeadPhone4.Size = Vector3.new(1.25, 0.562, 0.375)
  276. HeadPhone4.CFrame = char.Head.CFrame * CFrame.new(0, 0.219, 0) * CFrame.Angles(0, 0, 0)
  277. HeadPhone4.Anchored = true
  278. HeadPhone4.CanCollide = false
  279. HeadPhone4.Material = "SmoothPlastic"
  280. local Weld = Instance.new("WeldConstraint", char)
  281. Weld.Part0 = HeadPhone4
  282. Weld.Part1 = char.Head
  283. HeadPhone4.Anchored = false
  284.  
  285. local HeadPhone5 = Instance.new("Part", char)
  286. HeadPhone5.BrickColor = BrickColor.new("Lime green")
  287. HeadPhone5.Size = Vector3.new(1.406, 0.75, 0.625)
  288. HeadPhone5.Shape = "Cylinder"
  289. HeadPhone5.CFrame = char.Head.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  290. HeadPhone5.Anchored = true
  291. HeadPhone5.CanCollide = false
  292. HeadPhone5.Material = "SmoothPlastic"
  293. local Weld = Instance.new("WeldConstraint", char)
  294. Weld.Part0 = HeadPhone5
  295. Weld.Part1 = char.Head
  296. HeadPhone5.Anchored = false
  297.  
  298.  
  299. local HeadPhone6 = Instance.new("Part", char)
  300. HeadPhone6.BrickColor = BrickColor.new("Institutional white")
  301. HeadPhone6.Size = Vector3.new(1.562, 0.5, 0.417)
  302. HeadPhone6.Shape = "Cylinder"
  303. HeadPhone6.CFrame = char.Head.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  304. HeadPhone6.Anchored = true
  305. HeadPhone6.CanCollide = false
  306. HeadPhone6.Material = "SmoothPlastic"
  307. local Weld = Instance.new("WeldConstraint", char)
  308. Weld.Part0 = HeadPhone6
  309. Weld.Part1 = char.Head
  310. HeadPhone6.Anchored = false
  311.  
  312.  
  313. local RSpeaker1 = Instance.new("Part", char)
  314. RSpeaker1.BrickColor = BrickColor.new("Smoky grey")
  315. RSpeaker1.Size = Vector3.new(0.875, 0.875, 0.727)
  316. RSpeaker1.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, 0) * CFrame.Angles(0, 0, 0)
  317. RSpeaker1.Anchored = true
  318. RSpeaker1.CanCollide = false
  319. RSpeaker1.Material = "SmoothPlastic"
  320. local Weld = Instance.new("WeldConstraint", char)
  321. Weld.Part0 = RSpeaker1
  322. Weld.Part1 = char["Right Arm"]
  323. RSpeaker1.Anchored = false
  324.  
  325.  
  326. local RSpeaker2 = Instance.new("Part", char)
  327. RSpeaker2.BrickColor = BrickColor.new("Smoky grey")
  328. RSpeaker2.Size = Vector3.new(0.75, 0.875, 0.623)
  329. RSpeaker2.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.188, 0) * CFrame.Angles(0, 0, 0)
  330. RSpeaker2.Anchored = true
  331. RSpeaker2.CanCollide = false
  332. RSpeaker2.Material = "SmoothPlastic"
  333. local Weld = Instance.new("WeldConstraint", char)
  334. Weld.Part0 = RSpeaker2
  335. Weld.Part1 = char["Right Arm"]
  336. RSpeaker2.Anchored = false
  337.  
  338. local RSpeaker3 = Instance.new("Part", char)
  339. RSpeaker3.BrickColor = BrickColor.new("Lime green")
  340. RSpeaker3.Shape = "Cylinder"
  341. RSpeaker3.Size = Vector3.new(0.062, 0.716, 0.716)
  342. RSpeaker3.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, -0.410) * CFrame.Angles(0, math.rad(90), 0)
  343. RSpeaker3.Anchored = true
  344. RSpeaker3.CanCollide = false
  345. RSpeaker3.Material = "SmoothPlastic"
  346. local Weld = Instance.new("WeldConstraint", char)
  347. Weld.Part0 = RSpeaker3
  348. Weld.Part1 = char["Right Arm"]
  349. RSpeaker3.Anchored = false
  350.  
  351. local RSpeaker4 = Instance.new("Part", char)
  352. RSpeaker4.BrickColor = BrickColor.new("Institutional white")
  353. RSpeaker4.Shape = "Cylinder"
  354. RSpeaker4.Size = Vector3.new(0.08, 0.716, 0.341)
  355. RSpeaker4.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 1.438, -0.418) * CFrame.Angles(0, math.rad(90), 0)
  356. RSpeaker4.Anchored = true
  357. RSpeaker4.CanCollide = false
  358. RSpeaker4.Material = "SmoothPlastic"
  359. local Weld = Instance.new("WeldConstraint", char)
  360. Weld.Part0 = RSpeaker4
  361. Weld.Part1 = char["Right Arm"]
  362. RSpeaker4.Anchored = false
  363.  
  364. local RSpeaker5 = Instance.new("Part", char)
  365. RSpeaker5.BrickColor = BrickColor.new("Lime green")
  366. RSpeaker5.Shape = "Cylinder"
  367. RSpeaker5.Size = Vector3.new(0.062, 0.614, 0.489)
  368. RSpeaker5.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.25, -0.363) * CFrame.Angles(0, math.rad(90), 0)
  369. RSpeaker5.Anchored = true
  370. RSpeaker5.CanCollide = false
  371. RSpeaker5.Material = "SmoothPlastic"
  372. local Weld = Instance.new("WeldConstraint", char)
  373. Weld.Part0 = RSpeaker5
  374. Weld.Part1 = char["Right Arm"]
  375. RSpeaker5.Anchored = false
  376.  
  377. local RSpeaker6 = Instance.new("Part", char)
  378. RSpeaker6.BrickColor = BrickColor.new("Institutional white")
  379. RSpeaker6.Shape = "Cylinder"
  380. RSpeaker6.Size = Vector3.new(0.068, 0.614, 0.239)
  381. RSpeaker6.CFrame = char["Right Arm"].CFrame * CFrame.new(0, 2.25, -0.366) * CFrame.Angles(0, math.rad(90), 0)
  382. RSpeaker6.Anchored = true
  383. RSpeaker6.CanCollide = false
  384. RSpeaker6.Material = "SmoothPlastic"
  385. local Weld = Instance.new("WeldConstraint", char)
  386. Weld.Part0 = RSpeaker6
  387. Weld.Part1 = char["Right Arm"]
  388. RSpeaker6.Anchored = false
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401. local LSpeaker1 = Instance.new("Part", char)
  402. LSpeaker1.BrickColor = BrickColor.new("Smoky grey")
  403. LSpeaker1.Size = Vector3.new(0.875, 0.875, 0.727)
  404. LSpeaker1.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, 0) * CFrame.Angles(0, 0, 0)
  405. LSpeaker1.Anchored = true
  406. LSpeaker1.CanCollide = false
  407. LSpeaker1.Material = "SmoothPlastic"
  408. local Weld = Instance.new("WeldConstraint", char)
  409. Weld.Part0 = LSpeaker1
  410. Weld.Part1 = char["Left Arm"]
  411. LSpeaker1.Anchored = false
  412.  
  413.  
  414. local LSpeaker2 = Instance.new("Part", char)
  415. LSpeaker2.BrickColor = BrickColor.new("Smoky grey")
  416. LSpeaker2.Size = Vector3.new(0.75, 0.875, 0.623)
  417. LSpeaker2.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.188, 0) * CFrame.Angles(0, 0, 0)
  418. LSpeaker2.Anchored = true
  419. LSpeaker2.CanCollide = false
  420. LSpeaker2.Material = "SmoothPlastic"
  421. local Weld = Instance.new("WeldConstraint", char)
  422. Weld.Part0 = LSpeaker2
  423. Weld.Part1 = char["Left Arm"]
  424. LSpeaker2.Anchored = false
  425.  
  426. local LSpeaker3 = Instance.new("Part", char)
  427. LSpeaker3.BrickColor = BrickColor.new("Lime green")
  428. LSpeaker3.Shape = "Cylinder"
  429. LSpeaker3.Size = Vector3.new(0.062, 0.716, 0.716)
  430. LSpeaker3.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, -0.410) * CFrame.Angles(0, math.rad(90), 0)
  431. LSpeaker3.Anchored = true
  432. LSpeaker3.CanCollide = false
  433. LSpeaker3.Material = "SmoothPlastic"
  434. local Weld = Instance.new("WeldConstraint", char)
  435. Weld.Part0 = LSpeaker3
  436. Weld.Part1 = char["Left Arm"]
  437. LSpeaker3.Anchored = false
  438.  
  439. local LSpeaker4 = Instance.new("Part", char)
  440. LSpeaker4.BrickColor = BrickColor.new("Institutional white")
  441. LSpeaker4.Shape = "Cylinder"
  442. LSpeaker4.Size = Vector3.new(0.08, 0.716, 0.341)
  443. LSpeaker4.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 1.438, -0.418) * CFrame.Angles(0, math.rad(90), 0)
  444. LSpeaker4.Anchored = true
  445. LSpeaker4.CanCollide = false
  446. LSpeaker4.Material = "SmoothPlastic"
  447. local Weld = Instance.new("WeldConstraint", char)
  448. Weld.Part0 = LSpeaker4
  449. Weld.Part1 = char["Left Arm"]
  450. LSpeaker4.Anchored = false
  451.  
  452. local LSpeaker5 = Instance.new("Part", char)
  453. LSpeaker5.BrickColor = BrickColor.new("Lime green")
  454. LSpeaker5.Shape = "Cylinder"
  455. LSpeaker5.Size = Vector3.new(0.062, 0.614, 0.489)
  456. LSpeaker5.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.25, -0.363) * CFrame.Angles(0, math.rad(90), 0)
  457. LSpeaker5.Anchored = true
  458. LSpeaker5.CanCollide = false
  459. LSpeaker5.Material = "SmoothPlastic"
  460. local Weld = Instance.new("WeldConstraint", char)
  461. Weld.Part0 = LSpeaker5
  462. Weld.Part1 = char["Left Arm"]
  463. LSpeaker5.Anchored = false
  464.  
  465. local LSpeaker6 = Instance.new("Part", char)
  466. LSpeaker6.BrickColor = BrickColor.new("Institutional white")
  467. LSpeaker6.Shape = "Cylinder"
  468. LSpeaker6.Size = Vector3.new(0.068, 0.614, 0.239)
  469. LSpeaker6.CFrame = char["Left Arm"].CFrame * CFrame.new(0, 2.25, -0.366) * CFrame.Angles(0, math.rad(90), 0)
  470. LSpeaker6.Anchored = true
  471. LSpeaker6.CanCollide = false
  472. LSpeaker6.Material = "SmoothPlastic"
  473. local Weld = Instance.new("WeldConstraint", char)
  474. Weld.Part0 = LSpeaker6
  475. Weld.Part1 = char["Left Arm"]
  476. LSpeaker6.Anchored = false
  477.  
  478.  
  479. plr.Chatted:Connect(function(msg)
  480. if string.sub(msg,1,3) == "id;" then
  481. Music.SoundId = "rbxassetid://"..string.sub(msg,4)
  482. Music:Play()
  483. end
  484. end)
  485.  
  486. plr.Chatted:Connect(function(msg)
  487. if string.sub(msg,1,7) == "volume;" then
  488. Music.Volume = string.sub(msg,8)
  489. end
  490. end)
  491.  
  492.  
  493.  
  494. m.KeyDown:Connect(function(k)
  495. k:lower()
  496. if k == "f" then
  497. local SoundEX = Instance.new("Part", workspace)
  498. SoundEX.Shape = "Ball"
  499. SoundEX.Anchored = false
  500. SoundEX.BrickColor = BrickColor.new("Lime green")
  501. SoundEX.CFrame = RSpeaker1.CFrame
  502. SoundEX.Transparency = 0
  503. local SoundEX2 = Instance.new("Part", workspace)
  504. SoundEX2.Shape = "Ball"
  505. SoundEX2.Anchored = false
  506. SoundEX2.CanCollide = false
  507. SoundEX.CanCollide = false
  508. SoundEX2.BrickColor = BrickColor.new("Lime green")
  509. SoundEX2.CFrame = LSpeaker1.CFrame
  510. SoundEX2.Material = Enum.Material.ForceField
  511. SoundEX.Material = Enum.Material.ForceField
  512. SoundEX2.Transparency = 0
  513. Debris:AddItem(SoundEX, 0.5)
  514. Debris:AddItem(SoundEX2, 0.5)
  515. SoundEX.Size = Vector3.new(1, 1, 1)
  516. SoundEX2.Size = Vector3.new(1, 1, 1)
  517. wait()
  518. SoundEX.Velocity = Vector3.new(0, 0, 0)
  519. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  520. SoundEX2.Transparency = 0.1
  521. SoundEX.Transparency = 0.1
  522. SoundEX.Size = SoundEX.Size * 1.35
  523. SoundEX2.Size = SoundEX2.Size * 1.35
  524. wait()
  525. SoundEX.Velocity = Vector3.new(0, 0, 0)
  526. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  527. SoundEX.Size = SoundEX.Size * 1.35
  528. SoundEX2.Size = SoundEX2.Size * 1.35
  529. SoundEX2.Transparency = 0.2
  530. SoundEX.Transparency = 0.2
  531. wait()
  532. SoundEX.Velocity = Vector3.new(0, 0, 0)
  533. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  534. SoundEX.Size = SoundEX.Size * 1.35
  535. SoundEX2.Size = SoundEX2.Size * 1.35
  536. SoundEX2.Transparency = 0.3
  537. SoundEX.Transparency = 0.3
  538. wait()
  539. SoundEX.Velocity = Vector3.new(0, 0, 0)
  540. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  541. SoundEX.Size = SoundEX.Size * 1.35
  542. SoundEX2.Size = SoundEX2.Size * 1.35
  543. SoundEX2.Transparency = 0.4
  544. SoundEX.Transparency = 0.4
  545. wait()
  546. SoundEX.Velocity = Vector3.new(0, 0, 0)
  547. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  548. SoundEX.Size = SoundEX.Size * 1.35
  549. SoundEX2.Size = SoundEX2.Size * 1.35
  550. SoundEX2.Transparency = 0.5
  551. SoundEX.Transparency = 0.5
  552. wait()
  553. SoundEX.Velocity = Vector3.new(0, 0, 0)
  554. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  555. SoundEX.Size = SoundEX.Size * 1.35
  556. SoundEX2.Size = SoundEX2.Size * 1.35
  557. SoundEX2.Transparency = 0.6
  558. SoundEX.Transparency = 0.6
  559. wait()
  560. SoundEX.Velocity = Vector3.new(0, 0, 0)
  561. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  562. SoundEX.Size = SoundEX.Size * 1.35
  563. SoundEX2.Size = SoundEX2.Size * 1.35
  564. SoundEX2.Transparency = 0.7
  565. SoundEX.Transparency = 0.7
  566. wait()
  567. SoundEX.Velocity = Vector3.new(0, 0, 0)
  568. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  569. SoundEX.Size = SoundEX.Size * 1.35
  570. SoundEX2.Size = SoundEX2.Size * 1.35
  571. SoundEX2.Transparency = 0.8
  572. SoundEX.Transparency = 0.8
  573. wait()
  574. SoundEX.Velocity = Vector3.new(0, 0, 0)
  575. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  576. SoundEX.Size = SoundEX.Size * 1.35
  577. SoundEX2.Size = SoundEX2.Size * 1.35
  578. SoundEX2.Transparency = 0.9
  579. SoundEX.Transparency = 0.9
  580. wait()
  581. SoundEX.Velocity = Vector3.new(0, 0, 0)
  582. SoundEX2.Velocity = Vector3.new(0, 0, 0)
  583. SoundEX.Size = SoundEX.Size * 1.35
  584. SoundEX2.Size = SoundEX2.Size * 1.35
  585. SoundEX2.Transparency = 1
  586. SoundEX.Transparency = 1
  587. dam = false
  588. SoundEX.Touched:Connect(function(s)
  589. if s.Parent:FindFirstChildOfClass("Humanoid") and s.Parent.Name ~= char.Name then
  590. if dam == false then
  591. local hit = Instance.new("Sound", s)
  592. hit.SoundId = "rbxassetid://406913243"
  593. hit:Play()
  594. s.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(10)
  595. dam = true
  596. end
  597. end
  598. end)
  599. SoundEX2.Touched:Connect(function(s)
  600. if s.Parent:FindFirstChildOfClass("Humanoid") and s.Parent.Name ~= char.Name then
  601. if dam == false then
  602. local hit = Instance.new("Sound", s)
  603. hit.SoundId = "rbxassetid://406913243"
  604. hit:Play()
  605. s.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(10)
  606. dam = true
  607. end
  608. end
  609. end)
  610. end
  611. end)
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619. --// Instance Creation Functions \\--
  620.  
  621.  
  622. function Part(parent,color,material,size,cframe,anchored,cancollide)
  623. local part = IN("Part")
  624. part.Parent = parent or Char
  625. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  626. part.Material = material or Enum.Material.SmoothPlastic
  627. part.TopSurface,part.BottomSurface=10,10
  628. part.Size = size or V3.N(1,1,1)
  629. part.CFrame = cframe or CF.N(0,0,0)
  630. part.CanCollide = cancollide or false
  631. part.Anchored = anchored or false
  632. return part
  633. end
  634.  
  635. function Weld(part0,part1,c0,c1)
  636. local weld = IN("Weld")
  637. weld.Parent = part0
  638. weld.Part0 = part0
  639. weld.Part1 = part1
  640. weld.C0 = c0 or CF.N()
  641. weld.C1 = c1 or CF.N()
  642. return weld
  643. end
  644.  
  645. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  646. local part = IN("SpecialMesh")
  647. part.MeshId = meshid or ""
  648. part.TextureId = textid or ""
  649. part.Scale = scale or V3.N(1,1,1)
  650. part.Offset = offset or V3.N(0,0,0)
  651. part.MeshType = meshtype or Enum.MeshType.Sphere
  652. part.Parent = parent
  653. return part
  654. end
  655.  
  656. NewInstance = function(instance,parent,properties)
  657. local inst = Instance.new(instance)
  658. inst.Parent = parent
  659. if(properties)then
  660. for i,v in next, properties do
  661. pcall(function() inst[i] = v end)
  662. end
  663. end
  664. return inst;
  665. end
  666.  
  667. function Clone(instance,parent,properties)
  668. local inst = instance:Clone()
  669. inst.Parent = parent
  670. if(properties)then
  671. for i,v in next, properties do
  672. pcall(function() inst[i] = v end)
  673. end
  674. end
  675. return inst;
  676. end
  677.  
  678.  
  679.  
  680.  
  681. --// Customization \\--
  682.  
  683. local DamageColor = BrickColor.new'White'
  684.  
  685. --// Stop animations \\--
  686. for _,v in next, Hum:GetPlayingAnimationTracks() do
  687. v:Stop();
  688. end
  689.  
  690. pcall(game.Destroy,Char:FindFirstChild'Animate')
  691. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  692.  
  693. --// Joints \\--
  694.  
  695. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
  696. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
  697. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
  698. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
  699. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
  700. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  701.  
  702. local LSC0 = LS.C0
  703. local RSC0 = RS.C0
  704. local NKC0 = NK.C0
  705. local LHC0 = LH.C0
  706. local RHC0 = RH.C0
  707. local RJC0 = RJ.C0
  708.  
  709. --// Artificial HB \\--
  710.  
  711. local ArtificialHB = IN("BindableEvent", script)
  712. ArtificialHB.Name = "Heartbeat"
  713.  
  714. script:WaitForChild("Heartbeat")
  715.  
  716. local tf = 0
  717. local allowframeloss = false
  718. local tossremainder = false
  719. local lastframe = tick()
  720. local frame = 1/Frame_Speed
  721. ArtificialHB:Fire()
  722.  
  723. game:GetService("RunService").Heartbeat:connect(function(s, p)
  724. tf = tf + s
  725. if tf >= frame then
  726. if allowframeloss then
  727. script.Heartbeat:Fire()
  728. lastframe = tick()
  729. else
  730. for i = 1, math.floor(tf / frame) do
  731. ArtificialHB:Fire()
  732. end
  733. lastframe = tick()
  734. end
  735. if tossremainder then
  736. tf = 0
  737. else
  738. tf = tf - frame * math.floor(tf / frame)
  739. end
  740. end
  741. end)
  742.  
  743. function swait(num)
  744. if num == 0 or num == nil then
  745. ArtificialHB.Event:wait()
  746. else
  747. for i = 0, num do
  748. ArtificialHB.Event:wait()
  749. end
  750. end
  751. end
  752.  
  753.  
  754.  
  755. mesuk = "Put id of the music here"
  756.  
  757.  
  758. while true do
  759. swait()
  760.  
  761. Sine = Sine + Change
  762.  
  763. 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)
  764.  
  765. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  766. 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")
  767. if(not Effects or not Effects.Parent)then
  768. Effects = IN("Model",Char)
  769. Effects.Name = "Effects"
  770. end
  771. if(State == 'Walk')then
  772. local wsVal = 20 / (Hum.WalkSpeed/16)
  773. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  774. Change = 3
  775. 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)
  776. 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)
  777. else
  778. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  779. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  780. end
  781.  
  782. Hum.WalkSpeed = WalkSpeed
  783.  
  784. if(NeutralAnims)then
  785. if(State == 'Idle')then
  786. local Alpha = .1
  787. Change = .75
  788. 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)
  789. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(0*M.C(Sine/12)),0,0),Alpha)
  790. 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)
  791. 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)
  792. 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)
  793. 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)
  794. -- idle
  795. elseif(State == 'Run')then
  796. local wsVal = 20 / (Hum.WalkSpeed/16)
  797. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  798. 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)
  799. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  800. 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)
  801. 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)
  802. 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)
  803. 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)
  804. elseif(State == 'Walk')then
  805. local wsVal = 20 / (Hum.WalkSpeed/16)
  806. local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1)
  807. 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)
  808. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  809. 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)
  810.  
  811. 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)
  812.  
  813. 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)
  814. 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)
  815. elseif(State == 'Jump')then
  816. local Alpha = .1
  817. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  818. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(5)),Alpha)
  819. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(-5)),Alpha)
  820. 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)
  821. 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)
  822. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  823. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  824. elseif(State == 'Fall')then
  825. local Alpha = .1
  826. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  827. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-5)+idk),Alpha)
  828. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(5)-idk),Alpha)
  829. 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)
  830. 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)
  831. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  832. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  833. elseif(State == 'Paralyzed')then
  834. -- paralyzed
  835. elseif(State == 'Sit')then
  836. -- sit
  837. end
  838. end
  839. end
Add Comment
Please, Sign In to add comment