Advertisement
TheYoutuber_Pro

dj

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