Advertisement
DarkSideYT123

Untitled

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