Advertisement
DarkSideYT123

Untitled

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