Advertisement
MrSlakyx

dadad

May 1st, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.16 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility by WaverlyCole & Fireboltofdeath");print("https://github.com/WaverlyCole/FE-Compatibility-VoidSb-")
  2. local Wrapper = {};Wrapper.Fake = {};Wrapper.Real = {};Wrapper.Data = {};
  3. local sGame = game;local sScript = script;local sOwner = owner;local sInstance = Instance;local sLoadLibrary = LoadLibrary
  4. Wrapper.Event = Instance.new("RemoteEvent");Wrapper.Event.Name = "UserInput";
  5. Wrapper.CreateObject = function(connections, index)
  6. local proxy = newproxy (true);local meta = getmetatable (proxy);
  7. local runbind = function (self, i, ...) connections[i]:Fire (...); end;
  8. while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
  9. meta.__index = function (self, i)
  10. if (i == 'TriggerEvent') then return runbind end;
  11. return connections[i] and connections[i].Event or index[i];
  12. end;
  13. meta.__newindex = index;meta.__metatable = false;return proxy
  14. end;
  15. Wrapper.Mouse = Wrapper.CreateObject({"KeyUp","KeyDown","Button1Down","Button1Up","Move","Button2Down","Button2Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
  16. Wrapper.UserInputService = Wrapper.CreateObject({"InputBegan","InputEnded"},{})
  17. Wrapper.ContextActionService = {Actions={};BindAction = function(self,actionName,Func,touch,...)self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end;UnBindAction = function(self,actionName,Func,touch,...)self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end};
  18. Wrapper.Sandbox = function(...)
  19. local Unwrap = {...};
  20. for obi = 1,#Unwrap do
  21. local Object = Unwrap[obi];
  22. if (Wrapper.Fake[Object] == nil and Wrapper.Real[Object] == nil) then
  23. local Type = typeof(Object);local Replacement = Object;
  24. if (Type == "function") then
  25. Replacement = function(...)
  26. local IsRoblox = not (pcall(function() string.dump(Object) end))
  27. if IsRoblox then
  28. return Object(Wrapper.Unsandbox(...))
  29. end
  30. return Object(Wrapper.Sandbox(...))
  31. end
  32. elseif (Type == "table") then
  33. Replacement = {};
  34. setmetatable(Replacement, {
  35. __index = function(self, i)
  36. return Wrapper.Sandbox(Object[Wrapper.Unsandbox(i)])
  37. end,
  38. __newindex = function(self,i,v)
  39. Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v)
  40. end;
  41. })
  42. elseif (Type == "Instance") then
  43. Replacement = newproxy(true);
  44. local Mt = getmetatable(Replacement);
  45. Mt.__namecall = function(self, ...)
  46. local Pack = {...};local Name = Pack[#Pack];table.remove(Pack, #Pack);
  47. local Rest = nil;pcall(function()Rest = Object[Name];end);
  48. for g, x in pairs (Wrapper.InstanceMT["GET"]) do
  49. if (Object:IsA(g) or g == "Global") then
  50. for t, v in pairs(x) do
  51. for str in string.gmatch(t .. ",", "(%w+),") do
  52. if (Name == str) then
  53. if typeof(v) == "function" then
  54. return Wrapper.Sandbox(v(Wrapper.Unsandbox(self), Wrapper.Unsandbox(unpack(Pack))))
  55. else
  56. return v;
  57. end
  58. end
  59. end
  60. end
  61. end
  62. end
  63. if (Rest == nil) then
  64. if Wrapper.Sandbox(sGame):GetService(unpack(Pack)) then return Wrapper.Sandbox(sGame):GetService(unpack(Pack))end;
  65. return Wrapper.Sandbox(Object[Name]);
  66. elseif (typeof(Rest) == "function") then
  67. return Wrapper.Sandbox(Rest(Wrapper.Unsandbox(self), Wrapper.Unsandbox(unpack(Pack))))
  68. end
  69. return Wrapper.Sandbox(Object[Name]);
  70. end
  71. Mt.__index = function(self, i)
  72. local Rest = nil;pcall(function()Rest = Object[i];end)
  73. for g, x in pairs (Wrapper.InstanceMT["GET"]) do
  74. if (Object:IsA(g) or g == "Global") then
  75. for t, v in pairs(x) do
  76. for str in string.gmatch(t .. ",", "(%w+),") do
  77. if (i == str) then
  78. if typeof(v) == "function" then
  79. return function(...)return Wrapper.Sandbox(v(Wrapper.Unsandbox(self), Wrapper.Unsandbox(...)))end;
  80. else
  81. return v;
  82. end
  83. end
  84. end
  85. end
  86. end
  87. end
  88. if (Object:IsA("Sound") and i == "PlaybackLoudness") then return Wrapper.SoundLoudness[Wrapper.Unsandbox(Object)];end;
  89. if (Rest == nil) then
  90. if Wrapper.Sandbox(sGame):GetService(i) then return Wrapper.Sandbox(sGame):GetService(i)end;
  91. return Wrapper.Sandbox(Object[i]);
  92. elseif (typeof(Rest) == "function") then
  93. local isService,Service = pcall(function() return sGame:GetService(i) end)
  94. if isService and Service then return Wrapper.Sandbox(Service) end
  95. return function(self, ...)
  96. return Wrapper.Sandbox(Rest(Wrapper.Unsandbox(self), Wrapper.Unsandbox(...)))
  97. end
  98. end
  99. return Wrapper.Sandbox(Object[i]);
  100. end
  101. Mt.__newindex = function(self, i, v)
  102. for g,x in pairs (Wrapper.InstanceMT["SET"]) do
  103. if (Object:IsA(g)) then
  104. for t, v in pairs(x) do
  105. for str in string.gmatch( t .. ",", "(%w+),") do
  106. if v(Wrapper.Unsandbox(self, i, v)) == true then
  107. Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v);return
  108. end
  109. end
  110. end
  111. end
  112. end
  113. Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v);
  114. end
  115. Mt.__tostring = function(self) return tostring(Object) end
  116. --elseif (Type == "") then -- Etc
  117. end
  118. Wrapper.Fake[Object] = Replacement;Wrapper.Real[Replacement] = Object;Unwrap[obi] = Replacement;
  119. else
  120. return Wrapper.Fake[Object] or Object;
  121. end
  122. end
  123. return unpack(Unwrap);
  124. end
  125. Wrapper.Unsandbox = function(...)
  126. local Unsandbox = {...};
  127. for i,v in pairs (Unsandbox) do Unsandbox[i] = Wrapper.Real[v] or Unsandbox[i]end;
  128. return unpack(Unsandbox)
  129. end
  130. Wrapper.Services = {
  131. ['contextactionservice'] = Wrapper.ContextActionService;
  132. ["userinputservice"] = Wrapper.UserInputService;
  133. }
  134. Wrapper.InstanceMT = {
  135. ["GET"] = {
  136. ["Global"] = {
  137. ["IsFake,isFake"] = function(self)return true;end;
  138. };
  139. ["Player"] = {
  140. ["mouse,Mouse,getMouse,GetMouse"] = function(self)return Wrapper.Mouse;end;
  141. };
  142. ["Players"] = {
  143. ["localPlayer,LocalPlayer"] = Wrapper.Sandbox(owner)
  144. };
  145. ["DataModel"] = {
  146. ["getService,GetService"] = function(self,service)
  147. if Wrapper.Services[service:lower()] then return Wrapper.Sandbox(Wrapper.Services[service:lower()])end;
  148. return Wrapper.Sandbox(sGame:GetService(service))
  149. end
  150. };
  151. ["RunService"] = {
  152. ["renderstepped,renderStepped,RenderStepped"] = sGame:GetService("RunService").Stepped;
  153. }
  154. };
  155. ["SET"] = {
  156. }
  157. }
  158. Wrapper.SoundLoudness = {};
  159. Wrapper.Event.OnServerEvent:Connect(function(FiredBy,Input)
  160. if FiredBy ~= sOwner then return end
  161. if Input.MouseEvent then
  162. Wrapper.Mouse.Target = Input.Target;Wrapper.Mouse.Hit = Input.Hit;Wrapper.Mouse:TriggerEvent("Move")
  163. elseif Input.Sound then
  164. if Wrapper.SoundLoudness[Input.Sound] then Wrapper.SoundLoudness[Input.Sound] = Input.Loudness end
  165. else
  166. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  167. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Wrapper.Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
  168. if Input.UserInputType == Enum.UserInputType.MouseButton2 then return Wrapper.Mouse:TriggerEvent(Begin and "Button2Down" or "Button2Up") end
  169. for _,Action in pairs(Wrapper.ContextActionService.Actions) do
  170. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  171. end
  172. Wrapper.Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());Wrapper.UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  173. end
  174. end);
  175. Wrapper.Event.Parent = NLS([[
  176. local Player = owner;local Sounds = {};local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse();
  177. local Input = function(Input,gameProcessedEvent)
  178. if gameProcessedEvent then return end;
  179. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  180. end
  181. Event.OnClientEvent:connect(function(Args)
  182. if Args[1] == "NewSound" and Args[2]:IsA("Sound") then table.insert(Sounds,Args[2]) end
  183. end)
  184. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  185. local Hit,Target;while wait(1/30) do
  186. for x,Sound in pairs(Sounds) do if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end; end;
  187. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  188. Hit = Mouse.Hit;Target = Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  189. end
  190. end]],sOwner.Character)
  191. Instance = {
  192. ["new"] = function(Type,Parent)
  193. local Real = sInstance.new(Type,Wrapper.Unsandbox(Parent))
  194. if Type:lower() == "sound" then
  195. if not Parent then
  196. Parent = sOwner.Character
  197. end
  198. Wrapper.SoundLoudness[Real] = 0;Wrapper.Event:FireClient(sOwner,{"NewSound",Real})
  199. end
  200. return Wrapper.Sandbox(Real)
  201. end
  202. }
  203. LoadLibrary = function(Library)
  204. if Library == "RbxUtility" then
  205. return setmetatable({},{
  206. __tostring = function() return "RbxUtility" end;
  207. __index = function(self, Index)
  208. if Index:lower() == "create" then
  209. return function(Type) return function(Data)
  210. Data = Data or {};local Inst = Instance.new(Type)
  211. for x,y in pairs(Data) do Inst[x] = y end
  212. return Inst
  213. end;end;
  214. end
  215. return sLoadLibrary(Library)[Index]
  216. end})
  217. end
  218. return sLoadLibrary(Library)
  219. end
  220. owner = Wrapper.Sandbox(owner);game = Wrapper.Sandbox(game)workspace = Wrapper.Sandbox(workspace)
  221. Game= game;Workspace = workspace;
  222.  
  223. local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse();
  224. local Torso = Character:FindFirstChild("Torso")
  225. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  226. local Humanoid = Character:FindFirstChild("Humanoid")
  227. local Head = Character:FindFirstChild("Head")
  228. local Right_Arm = Character:FindFirstChild("Right Arm")
  229. local Left_Arm = Character:FindFirstChild("Left Arm")
  230. local Right_Leg = Character:FindFirstChild("Right Leg")
  231. local Left_Leg = Character:FindFirstChild("Left Leg")
  232. local Right_Shoulder = Torso:FindFirstChild("Right Shoulder")
  233. local Left_Shoulder = Torso:FindFirstChild("Left Shoulder")
  234. local Right_Hip = Torso:FindFirstChild("Right Hip")
  235. local Left_Hip = Torso:FindFirstChild("Left Hip")
  236. local Neck = Torso:FindFirstChild("Neck")
  237. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  238. local rootJoint = rootPart:FindFirstChild("RootJoint")
  239. local CurrentIdle = "Idling1"
  240. local Degree = 0.0175438596491228
  241. local canremove = false
  242. local debounce = false
  243. local UIService=game:GetService'UserInputService'
  244. _G.SongName = math.random(1,9025232)
  245. sin = math.sin
  246. Right_Leg.FormFactor = "Custom";
  247. Left_Leg.FormFactor = "Custom";
  248. rootPart.Archivable = true;
  249. rootJoint.Archivable = true;
  250. c_new = CFrame.new;
  251. c_angles = CFrame.Angles;
  252. i_new = Instance.new
  253. Humanoid:ClearAllChildren();
  254. local isAttacking = false
  255. local isSprinting = false
  256. local Animations = false
  257. local Angle = 0
  258. local Axis = 0
  259. local angleSpeed = 1
  260. local axisSpeed = angleSpeed
  261. local currentAnim
  262. local levetatingheight = 3
  263. local WalkType = "Ground"
  264.  
  265. function Sound(parent,loop,vol,id)
  266. local s = Instance.new('Sound',parent)
  267. s.Looped = loop
  268. s.Volume = vol
  269. s.MaxDistance=200
  270. s.EmitterSize=20
  271. s.SoundId = 'rbxassetid://'..tostring(id)
  272. s:Play()
  273. if loop == false then
  274. wait(s.TimeLength)
  275. s:Destroy()
  276. end
  277. end
  278.  
  279. Sound(rootPart,true,1,146309999)
  280.  
  281. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  282. wld = Instance.new("Weld", wp1)
  283. wld.Part0 = wp0
  284. wld.Part1 = wp1
  285. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  286. return wld
  287. end
  288.  
  289. function noOutline(part)
  290. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  291. end
  292.  
  293. local function Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
  294. local partie = i_new("Part",parent)
  295. partie.Name=Name
  296. partie.BrickColor = BrickColor.new(Color)
  297. partie.Material = Material
  298. partie.Shape = Shape
  299. partie.Transparency = Transparency
  300. partie.Size = Size
  301. partie.CFrame = CFrame
  302. partie.CanCollide = CanCollide
  303. partie.Anchored = Anchored
  304. return partie
  305. end
  306.  
  307.  
  308.  
  309. function swait(num)
  310. if num == 0 or num == nil then
  311. game:GetService("RunService").Stepped:wait(0)
  312. else
  313. for i = 0, num do
  314. game:GetService("RunService").Stepped:wait(0)
  315. end
  316. end
  317. end
  318.  
  319. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  320. local mesh = i_new(Mesh)
  321. mesh.Parent = part
  322. if Mesh == "SpecialMesh" then
  323. mesh.MeshType = meshtype
  324. mesh.MeshId = meshid
  325. end
  326. mesh.Offset = offset
  327. mesh.Scale = scale
  328. return mesh
  329. end
  330.  
  331. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position, Direction, MaxDistance, IgnoreDescendants
  332. return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  333. end
  334.  
  335. function QuaternionFromCFrame(cf)
  336. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  337. local trace = m00 + m11 + m22
  338. if trace > 0 then
  339. local s = math.sqrt(1 + trace)
  340. local recip = 0.5/s
  341. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  342. else
  343. local i = 0
  344. if m11 > m00 then
  345. i = 1
  346. end
  347. if m22 > (i == 0 and m00 or m11) then
  348. i = 2
  349. end
  350. if i == 0 then
  351. local s = math.sqrt(m00-m11-m22+1)
  352. local recip = 0.5/s
  353. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  354. elseif i == 1 then
  355. local s = math.sqrt(m11-m22-m00+1)
  356. local recip = 0.5/s
  357. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  358. elseif i == 2 then
  359. local s = math.sqrt(m22-m00-m11+1)
  360. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  361. end
  362. end
  363. end
  364.  
  365. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  366. local xs, ys, zs = x + x, y + y, z + z
  367. local wx, wy, wz = w*xs, w*ys, w*zs
  368. local xx = x*xs
  369. local xy = x*ys
  370. local xz = x*zs
  371. local yy = y*ys
  372. local yz = y*zs
  373. local zz = z*zs
  374. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  375. end
  376.  
  377. function QuaternionSlerp(a, b, t)
  378. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  379. local startInterp, finishInterp;
  380. if cosTheta >= 0.0001 then
  381. if (1 - cosTheta) > 0.0001 then
  382. local theta = math.acos(cosTheta)
  383. local invSinTheta = 1/math.sin(theta)
  384. startInterp = math.sin((1-t)*theta)*invSinTheta
  385. finishInterp = math.sin(t*theta)*invSinTheta
  386. else
  387. startInterp = 1-t
  388. finishInterp = t
  389. end
  390. else
  391. if (1+cosTheta) > 0.0001 then
  392. local theta = math.acos(-cosTheta)
  393. local invSinTheta = 1/math.sin(theta)
  394. startInterp = math.sin((t-1)*theta)*invSinTheta
  395. finishInterp = math.sin(t*theta)*invSinTheta
  396. else
  397. startInterp = t-1
  398. finishInterp = t
  399. end
  400. end
  401. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  402. end
  403.  
  404. function clerp(a, b, t)
  405. local qa = {QuaternionFromCFrame(a)}
  406. local qb = {QuaternionFromCFrame(b)}
  407. local ax, ay, az = a.x, a.y, a.z
  408. local bx, by, bz = b.x, b.y, b.z
  409. local _t = 1-t
  410. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  411. end
  412.  
  413. swait()
  414. LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
  415. Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  416. RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
  417. Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  418. LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
  419. Left_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  420. RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
  421. Right_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  422. Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
  423. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  424. Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
  425.  
  426. for i,v in pairs(Character:GetChildren()) do
  427. if v:IsA('Accoutrement') or v:IsA('Shirt') or v:IsA('Pants') then
  428. v:Destroy()
  429. elseif v:IsA('Part') and v.Name=='Head' then
  430. v.face:Destroy()
  431. end
  432. end
  433.  
  434. Character['Body Colors'].HeadColor=BrickColor.new('Really black')
  435. Character['Body Colors'].TorsoColor=BrickColor.new('Really black')
  436. Character['Body Colors'].RightArmColor=BrickColor.new('Really black')
  437. Character['Body Colors'].LeftArmColor=BrickColor.new('Really black')
  438. Character['Body Colors'].RightLegColor=BrickColor.new('Really black')
  439. Character['Body Colors'].LeftLegColor=BrickColor.new('Really black')
  440.  
  441. Humanoid.DisplayDistanceType='None'
  442.  
  443. --Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
  444. --newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  445. local REye=Part('REye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character)
  446. newWeld(Head,REye,.2,.225,-.5)
  447. local REGlow=Instance.new('SurfaceLight')
  448. REGlow.Color=Color3.fromRGB(170,85,255)
  449. REGlow.Range=6
  450. REGlow.Brightness=10
  451. REGlow.Parent=REye
  452. local Glow=Instance.new('ParticleEmitter')
  453. Glow.Color=ColorSequence.new(Color3.fromRGB(170,85,255),Color3.fromRGB(170,85,255))
  454. Glow.Texture='rbxassetid://242292318'
  455. Glow.Transparency=NumberSequence.new(.9)
  456. Glow.Size=NumberSequence.new(.225)
  457. Glow.Acceleration=Vector3.new(45,30,0)
  458. Glow.LockedToPart=true
  459. Glow.Lifetime=NumberRange.new(.25,.25)
  460. Glow.Rate=1000
  461. Glow.EmissionDirection='Bottom'
  462. Glow.Speed=NumberRange.new(1,1)
  463. Glow.ZOffset=2
  464. Glow.Parent=REye
  465. local LEye=Part('LEye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character)
  466. newWeld(Head,LEye,-.2,.225,-.5)
  467. local LEGlow=Instance.new('SurfaceLight')
  468. LEGlow.Color=Color3.fromRGB(170,85,255)
  469. LEGlow.Range=6
  470. LEGlow.Brightness=10
  471. LEGlow.Parent=LEye
  472. local Glow2=Instance.new('ParticleEmitter')
  473. Glow2.Color=ColorSequence.new(Color3.fromRGB(0,0,0),Color3.fromRGB(0,0,0))
  474. Glow2.Texture='rbxassetid://242292318'
  475. Glow2.Transparency=NumberSequence.new(.988)
  476. Glow2.Size=NumberSequence.new(5)
  477. Glow2.LockedToPart=false
  478. Glow2.Lifetime=NumberRange.new(.5,.5)
  479. Glow2.Rate=1000
  480. Glow2.EmissionDirection='Top'
  481. Glow2.Speed=NumberRange.new(1,1)
  482. Glow2.VelocitySpread=Vector3.new(0,0,60)
  483. Glow2.ZOffset=1
  484. Glow2.Parent=Torso
  485.  
  486. sine = 0
  487. change = 1
  488. sprint=false
  489. local punches={
  490. a=false,
  491. b=false,
  492. c=false
  493. }
  494.  
  495. UIService.InputBegan:connect(function(Input,GUIProcessed)
  496. if not GUIProcessed and Input.UserInputType==Enum.UserInputType.MouseButton1 then
  497. if punches.a==false then
  498. punches.a=true wait(.4) punches.a=false
  499. else
  500. punches.a=true
  501. print('a ',punches.a)
  502. if punches.b==false then
  503. punches.b=true wait(.4) punches.b=false
  504. else
  505. punches.b=true
  506. print('b ',punches.b)
  507. if punches.c==false then
  508. punches.c=true wait(.4) punches.c=false
  509. else
  510. punches.c=true
  511. print('c ',punches.c)
  512. print('a ',punches.a,'b ',punches.b,'c ',punches.c)
  513. end
  514. end
  515. end
  516. elseif not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  517. sprint=true
  518. end
  519. end)
  520.  
  521. UIService.InputEnded:connect(function(Input,GUIProcessed)
  522. if not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  523. sprint=false
  524. end
  525. end)
  526.  
  527. game:GetService("RunService").RenderStepped:connect(function()
  528. Angle = (Angle % 100) + angleSpeed/10
  529. Axis = (Axis % 100) + axisSpeed/10
  530. walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
  531. jumpVel = Torso.Velocity.Y
  532. sine = change + sine
  533.  
  534. if(Humanoid.Jump) and jumpVel > 1 then
  535. currentAnim = "Jumping"
  536. elseif walkingMagnitude < 2 then
  537. currentAnim = "Idling"
  538. elseif isSprinting == true then
  539. currentAnim = "Sprinting"
  540. elseif walkingMagnitude > 2 then
  541. currentAnim = "Walking"
  542. elseif isAttacking == true then
  543. currentAnim = "Attacking"
  544. end
  545.  
  546. if currentAnim == "Jumping" and Animations == false then
  547. angleSpeed = 2
  548. axisSpeed = 2
  549. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  550. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  551. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  552. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  553. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  554. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  555. elseif currentAnim == "Idling" and Animations == false then
  556. angleSpeed = 1
  557. axisSpeed = 1
  558. change = 0.5
  559. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, .5, 0) * c_angles(math.rad(45), math.rad(-3), math.rad(-10)), 0.15)
  560. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(45), math.rad(5), math.rad(20)), 0.15)
  561. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(-20)), 0.15)
  562. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(30)), 0.15)
  563. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -2.5, 0) * c_angles(math.rad(10), math.rad(0), math.rad(0)), 0.15)
  564. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  565. elseif currentAnim == "Walking" and Animations == false then
  566. if sprint==false then
  567. angleSpeed = 1
  568. axisSpeed = 1
  569. Humanoid.WalkSpeed = 16
  570. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), -math.sin((rootPart.RotVelocity.X/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  571. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.X/5))/2, -math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  572. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/2)/1.5, math.sin((rootPart.RotVelocity.Y/5))/2, -math.sin((rootPart.RotVelocity.Y/5))/2), 0.15)
  573. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/2)/1.5, -math.sin((rootPart.RotVelocity.Y/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15)
  574. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15)
  575. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15)
  576. else
  577. angleSpeed = 10
  578. axisSpeed = 10
  579. Humanoid.WalkSpeed = 60
  580. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), -math.sin((rootPart.RotVelocity.X/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  581. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), math.sin((rootPart.RotVelocity.X/3))/2, -math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  582. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/1)/1, math.sin((rootPart.RotVelocity.Y/3))/2, -math.sin((rootPart.RotVelocity.Y/3))/2), 0.15)
  583. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/1)/1, -math.sin((rootPart.RotVelocity.Y/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15)
  584. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(-20), math.rad(0), math.sin((rootPart.RotVelocity.Y/15))/2), 0.15)
  585. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/1))/2, math.rad(0)), 0.15)
  586. end
  587. end
  588. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement