Advertisement
DarkSideYT123

Untitled

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