Advertisement
DarkSideYT123

Untitled

Aug 5th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.05 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. Mode = "Neutral"
  162. 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. end
  438.  
  439.  
  440.  
  441. ModeN.Changed:Connect(function(Number)
  442. if Number == 1 then
  443. TopHat2.BrickColor = BrickColor.new("Institutional white")
  444. else
  445. if Number == 2 then
  446. TopHat2.BrickColor = BrickColor.new("Lime green")
  447. else
  448. if Number == 3 then
  449. TopHat2.BrickColor = BrickColor.new("Really red")
  450. else
  451. if Number == 4 then
  452. TopHat2.BrickColor = BrickColor.new("Royal purple")
  453. else
  454. if Number == 5 then
  455. Rainbow = true
  456. else
  457.  
  458. end
  459. end
  460. end
  461. end
  462. end
  463. end)
  464.  
  465.  
  466.  
  467. m.KeyDown:Connect(function(k)
  468. k:lower()
  469. if k == "e" then
  470. if ModeN >= 1 and ModeN < 5 then
  471. ModeN = ModeN + 1
  472. end
  473. end
  474. end)
  475.  
  476. m.KeyDown:Connect(function(k)
  477. k:lower()
  478. if k == "q" then
  479. if ModeN >= 2 then
  480. ModeN = ModeN - 1
  481. end
  482. end
  483. end)
  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.  
  582.  
  583.  
  584. --// Instance Creation Functions \\--
  585.  
  586.  
  587. function Part(parent,color,material,size,cframe,anchored,cancollide)
  588. local part = IN("Part")
  589. part.Parent = parent or Char
  590. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  591. part.Material = material or Enum.Material.SmoothPlastic
  592. part.TopSurface,part.BottomSurface=10,10
  593. part.Size = size or V3.N(1,1,1)
  594. part.CFrame = cframe or CF.N(0,0,0)
  595. part.CanCollide = cancollide or false
  596. part.Anchored = anchored or false
  597. return part
  598. end
  599.  
  600. function Weld(part0,part1,c0,c1)
  601. local weld = IN("Weld")
  602. weld.Parent = part0
  603. weld.Part0 = part0
  604. weld.Part1 = part1
  605. weld.C0 = c0 or CF.N()
  606. weld.C1 = c1 or CF.N()
  607. return weld
  608. end
  609.  
  610. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  611. local part = IN("SpecialMesh")
  612. part.MeshId = meshid or ""
  613. part.TextureId = textid or ""
  614. part.Scale = scale or V3.N(1,1,1)
  615. part.Offset = offset or V3.N(0,0,0)
  616. part.MeshType = meshtype or Enum.MeshType.Sphere
  617. part.Parent = parent
  618. return part
  619. end
  620.  
  621. NewInstance = function(instance,parent,properties)
  622. local inst = Instance.new(instance)
  623. inst.Parent = parent
  624. if(properties)then
  625. for i,v in next, properties do
  626. pcall(function() inst[i] = v end)
  627. end
  628. end
  629. return inst;
  630. end
  631.  
  632. function Clone(instance,parent,properties)
  633. local inst = instance:Clone()
  634. inst.Parent = parent
  635. if(properties)then
  636. for i,v in next, properties do
  637. pcall(function() inst[i] = v end)
  638. end
  639. end
  640. return inst;
  641. end
  642.  
  643.  
  644.  
  645.  
  646. --// Customization \\--
  647.  
  648. local Frame_Speed = 60;
  649. local WalkSpeed = 16
  650. local DamageColor = BrickColor.new'White'
  651.  
  652. --// Stop animations \\--
  653. for _,v in next, Hum:GetPlayingAnimationTracks() do
  654. v:Stop();
  655. end
  656.  
  657. pcall(game.Destroy,Char:FindFirstChild'Animate')
  658. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  659.  
  660. --// Joints \\--
  661.  
  662. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
  663. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
  664. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
  665. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
  666. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
  667. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  668.  
  669. local LSC0 = LS.C0
  670. local RSC0 = RS.C0
  671. local NKC0 = NK.C0
  672. local LHC0 = LH.C0
  673. local RHC0 = RH.C0
  674. local RJC0 = RJ.C0
  675.  
  676. --// Artificial HB \\--
  677.  
  678. local ArtificialHB = IN("BindableEvent", script)
  679. ArtificialHB.Name = "Heartbeat"
  680.  
  681. script:WaitForChild("Heartbeat")
  682.  
  683. local tf = 0
  684. local allowframeloss = false
  685. local tossremainder = false
  686. local lastframe = tick()
  687. local frame = 1/Frame_Speed
  688. ArtificialHB:Fire()
  689.  
  690. game:GetService("RunService").Heartbeat:connect(function(s, p)
  691. tf = tf + s
  692. if tf >= frame then
  693. if allowframeloss then
  694. script.Heartbeat:Fire()
  695. lastframe = tick()
  696. else
  697. for i = 1, math.floor(tf / frame) do
  698. ArtificialHB:Fire()
  699. end
  700. lastframe = tick()
  701. end
  702. if tossremainder then
  703. tf = 0
  704. else
  705. tf = tf - frame * math.floor(tf / frame)
  706. end
  707. end
  708. end)
  709.  
  710. function swait(num)
  711. if num == 0 or num == nil then
  712. ArtificialHB.Event:wait()
  713. else
  714. for i = 0, num do
  715. ArtificialHB.Event:wait()
  716. end
  717. end
  718. end
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725. while true do
  726. swait()
  727. Sine = Sine + Change
  728.  
  729. 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)
  730.  
  731. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  732. 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")
  733. if(not Effects or not Effects.Parent)then
  734. Effects = IN("Model",Char)
  735. Effects.Name = "Effects"
  736. end
  737. if(State == 'Walk')then
  738. local wsVal = 20 / (Hum.WalkSpeed/16)
  739. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  740. Change = 3
  741. 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)
  742. 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)
  743. else
  744. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  745. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  746. end
  747.  
  748. Hum.WalkSpeed = WalkSpeed
  749.  
  750. if(NeutralAnims)then
  751. if(State == 'Idle')then
  752. local Alpha = .1
  753. Change = .75
  754. 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)
  755. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
  756. 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)
  757. 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)
  758. 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)
  759. 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)
  760. -- idle
  761. elseif(State == 'Run')then
  762. local wsVal = 20 / (Hum.WalkSpeed/16)
  763. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  764. 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)
  765. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  766. 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)
  767. 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)
  768. 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)
  769. 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)
  770. elseif(State == 'Walk')then
  771. local wsVal = 20 / (Hum.WalkSpeed/16)
  772. local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1)
  773. if Rainbow == true then
  774. TopHat2.BrickColor = BrickColor.new("Really red")
  775. wait(0.001)
  776. TopHat2.BrickColor = BrickColor.new("Neon orange")
  777. wait(0.001)
  778. TopHat2.BrickColor = BrickColor.new("Bright yellow")
  779. wait(0.001)
  780. TopHat2.BrickColor = BrickColor.new("Lime green")
  781. wait(0.001)
  782. TopHat2.BrickColor = BrickColor.new("Cyan")
  783. wait(0.001)
  784. TopHat2.BrickColor = BrickColor.new("Bright blue")
  785. wait(0.001)
  786. TopHat2.BrickColor = BrickColor.new("Royal purple")
  787. wait(0.001)
  788. end
  789. 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)
  790. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  791. 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)
  792. 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)
  793. 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)
  794. 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)
  795. elseif(State == 'Jump')then
  796. local Alpha = .1
  797. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  798. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  799. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  800. 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)
  801. 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)
  802. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  803. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  804. elseif(State == 'Fall')then
  805. local Alpha = .1
  806. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  807. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  808. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  809. 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)
  810. 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)
  811. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  812. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  813. elseif(State == 'Paralyzed')then
  814. -- paralyzed
  815. elseif(State == 'Sit')then
  816. -- sit
  817. end
  818. end
  819. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement