Advertisement
Guest User

fix maybe???

a guest
Aug 22nd, 2019
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.28 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. LocalScript1 = Instance.new("LocalScript")
  21. Script0.Name = "FakeMouseMainConversion"
  22. Script0.Parent = mas
  23. table.insert(cors,sandbox(Script0,function()
  24. wait'0.5'
  25. local RealPlayer = script.Parent.Parent
  26. local FakeMouse = script.FakeMouse:Clone();
  27. FakeMouse.Parent = RealPlayer.Character;
  28. script.FakeMouse:Destroy()
  29. do
  30. local GUID = {}
  31. do
  32. GUID.IDs = {};
  33. function GUID:new(len)
  34. local id;
  35. if(not len)then
  36. id = (tostring(function() end))
  37. id = id:gsub("function: ","")
  38. else
  39. local function genID(len)
  40. local newID = ""
  41. for i = 1,len do
  42. newID = newID..string.char(math.random(48,90))
  43. end
  44. return newID
  45. end
  46. repeat id = genID(len) until not GUID.IDs[id]
  47. local oid = id;
  48. id = {Trash=function() GUID.IDs[oid]=nil; end;Get=function() return oid; end}
  49. GUID.IDs[oid]=true;
  50. end
  51. return id
  52. end
  53. end
  54.  
  55. local AHB = Instance.new("BindableEvent")
  56.  
  57. local FPS = 30
  58.  
  59. local TimeFrame = 0
  60.  
  61. local LastFrame = tick()
  62. local Frame = 1/FPS
  63.  
  64. game:service'RunService'.Heartbeat:connect(function(s,p)
  65. TimeFrame = TimeFrame + s
  66. if(TimeFrame >= Frame)then
  67. for i = 1,math.floor(TimeFrame/Frame) do
  68. AHB:Fire()
  69. end
  70. LastFrame=tick()
  71. TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame)
  72. end
  73. end)
  74.  
  75.  
  76. function swait(dur)
  77. if(dur == 0 or typeof(dur) ~= 'number')then
  78. AHB.Event:wait()
  79. else
  80. for i = 1, dur*FPS do
  81. AHB.Event:wait()
  82. end
  83. end
  84. end
  85.  
  86. local oPlayer = RealPlayer
  87. local Player = oPlayer
  88.  
  89. local loudnesses={}
  90. script.Parent = Player.Character
  91. local CoAS = {Actions={}}
  92. local Event = Instance.new("RemoteEvent")
  93. Event.Name = "UserInputEvent"
  94. Event.Parent = Player.Character
  95. local Func = Instance.new("RemoteFunction")
  96. Func.Name = "GetClientProperty"
  97. Func.Parent = Player.Character
  98. local fakeEvent = function()
  99. local t = {_fakeEvent=true,Waited={},Connected={}}
  100. t.Connect = function(self,f)
  101. local ft={}
  102. ft={Disconnected=false;disconnect=function(s) if(self.Function==ft)then self.Function=nil end s.Disconnected=true end}
  103. ft.Disconnect=ft.disconnect
  104.  
  105. ft.Func=function(...)
  106. for id,_ in next, t.Waited do
  107. t.Waited[id] = true
  108. end
  109. return f(...)
  110. end;
  111.  
  112. table.insert(self.Connected,ft)
  113. return ft;
  114. end
  115. t.connect = t.Connect
  116. t.Wait = function()
  117. local guid = GUID:new(25)
  118. local waitingId = guid:Get()
  119. t.Waited[waitingId]=false
  120. repeat swait() until t.Waited[waitingId]==true
  121. t.Waited[waitingId]=nil;
  122. guid:Trash()
  123. end
  124. t.wait = t.Wait
  125. return t
  126. end
  127. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  128. local UsIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  129. local Run = {RenderStepped=fakeEvent()}
  130.  
  131. function CoAS:BindAction(name,fun,touch,...)
  132. CoAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  133. end
  134. function CoAS:UnbindAction(name)
  135. CoAS.Actions[name] = nil
  136. end
  137. local function te(self,ev,...)
  138. local t = self[ev]
  139. if t and t._fakeEvent and t.Connected then
  140. for i,v in next, t.Connected do
  141. if(v.Func and not v.Disconnected)then
  142. v.Func(...)
  143. else
  144. t.Connected[i]=nil
  145. end
  146. end
  147. end
  148. end
  149. m.TrigEvent = te
  150. UsIS.TrigEvent = te
  151. Run.TrigEvent = te
  152. Event.OnServerEvent:Connect(function(plr,io)
  153. if plr~=Player then return end
  154. --[[table.foreach(io,print)
  155. print'---']]
  156. if io.Mouse then
  157. m.Target = io.Target
  158. m.Hit = io.Hit
  159. elseif io.KeyEvent then
  160. m:TrigEvent('Key'..io.KeyEvent,io.Key)
  161. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  162. if io.UserInputState == Enum.UserInputState.Begin then
  163. m:TrigEvent("Button1Down")
  164. else
  165. m:TrigEvent("Button1Up")
  166. end
  167. end
  168. if(not io.KeyEvent and not io.Mouse)then
  169.  
  170. for n,t in pairs(CoAS.Actions) do
  171. for _,k in pairs(t.Keys) do
  172. if k==io.KeyCode then
  173. t.Function(t.Name,io.UserInputState,io)
  174. end
  175. end
  176. end
  177. if io.UserInputState == Enum.UserInputState.Begin then
  178. UsIS:TrigEvent("InputBegan",io,false)
  179. else
  180. UsIS:TrigEvent("InputEnded",io,false)
  181. end
  182. end
  183. end)
  184.  
  185. Func.OnServerInvoke = function(plr,inst,play)
  186. if plr~=Player then return end
  187. if(inst and typeof(inst) == 'Instance' and inst:IsA'Sound')then
  188. loudnesses[inst]=play
  189. end
  190. end
  191.  
  192. function GetClientProperty(inst,prop)
  193. if(prop == 'PlaybackLoudness' and loudnesses[inst])then
  194. return loudnesses[inst]
  195. elseif(prop == 'PlaybackLoudness')then
  196. return Func:InvokeClient(Player,'RegSound',inst)
  197. end
  198. return Func:InvokeClient(Player,inst,prop)
  199. end
  200. local oldGame = game;
  201. local oldPlayer = Player;
  202. local fakePlayer = newproxy(true)
  203. getmetatable(fakePlayer).__index = function(s,i)
  204. if(i == 'GetMouse')then
  205. return function() return m; end
  206. end
  207. return Player[i]
  208. end
  209. getmetatable(fakePlayer).__newindex = function(s,i,v)
  210. Player[i]=v
  211. end
  212. getmetatable(fakePlayer).__call=function(self,...)
  213. if(self == fakePlayer)then self = Player end
  214. local wh = {...}
  215. local name = table.remove(wh,1)
  216. for i,v in next, wh do
  217. wh[i]=v
  218. end
  219. if(name == 'GetMouse')then
  220. return m;
  221. end
  222. return self(name,unpack(wh))
  223. end
  224. getmetatable(fakePlayer).__namecall=function(self,...)
  225. if(self == fakePlayer)then self = Player end
  226. local tuple={...}
  227. local name = table.remove(tuple,#tuple)
  228.  
  229. if(name == 'GetMouse')then
  230. return m;
  231. else
  232. return self[name](self,unpack(tuple))
  233. end
  234. end
  235. local oll = LoadLibrary;
  236. function LoadLibrary(libtard)
  237. local libtarddestroyed=oll(libtard)
  238. if(libtard=='RbxUtility')then
  239. local library={Create=function(obj)
  240. local inst = Instance.new(obj)
  241. return function(props)
  242. for prop,valu in next, props do
  243. inst[prop]=valu
  244. end
  245. return inst
  246. end
  247. end}
  248. setmetatable(library,{__index=libtarddestroyed,__newindex=function(s,i,v) libtarddestroyed[i]=v end})
  249.  
  250. return library
  251. else
  252. return libtarddestroyed
  253. end
  254. end
  255. local function GetService(s,i)
  256. local service = s:GetService(i)
  257. if(i == 'Players')then
  258. local oldService = service;
  259. local fakeService = newproxy(true)
  260. getmetatable(fakeService).__index = function(s,i)
  261. if(s == fakeService)then s=oldService end
  262. if(i == 'LocalPlayer' or i == 'localPlayer')then
  263. return fakePlayer
  264. elseif(i == 'oPlayer')then
  265. return oPlayer
  266. else
  267. return s[i]
  268. end
  269. end
  270. getmetatable(fakeService).__newindex = function(s,i,v)
  271. if(s == fakeService)then s=oldService end
  272. s[i]=v
  273. end
  274. getmetatable(fakeService).__call=function(self,...)
  275. if(self == fakeService)then self = oldService end
  276. local wh = {...}
  277. local name = table.remove(wh,1)
  278. for i,v in next, wh do
  279. wh[i]=v
  280. end
  281. return self(name,unpack(wh))
  282. end
  283. getmetatable(fakeService).__namecall=function(self,...)
  284. if(self == fakeService)then self = oldService end
  285. local tuple={...}
  286. local name = table.remove(tuple,#tuple)
  287.  
  288. return self[name](self,unpack(tuple))
  289. end
  290. getmetatable(fakeService).__metatable = 'gay'
  291. return fakeService
  292. elseif(i == 'RunService')then
  293. local oldService = service;
  294. local fakeService = newproxy(true)
  295. getmetatable(fakeService).__index = function(s,i)
  296. if(s == fakeService)then s=oldService end
  297. return Run[i] or s[i]
  298. end
  299. getmetatable(fakeService).__newindex = function(s,i,v)
  300. if(s == fakeService)then s=oldService end
  301. s[i]=v
  302. end
  303. getmetatable(fakeService).__call=function(self,...)
  304. if(self == fakeService)then self = oldService end
  305. local wh = {...}
  306. local name = table.remove(wh,1)
  307. for i,v in next, wh do
  308. wh[i]=v
  309. end
  310. return self(name,unpack(wh))
  311. end
  312. getmetatable(fakeService).__namecall=function(self,...)
  313. if(self == fakeService)then self = oldService end
  314. local tuple={...}
  315. local name = table.remove(tuple,#tuple)
  316.  
  317. return self[name](self,unpack(tuple))
  318. end
  319. getmetatable(fakeService).__metatable = 'gay'
  320. return fakeService
  321. elseif(i == 'UserInputService')then
  322. return UsIS
  323. elseif(i == 'ContextActionService')then
  324. return CoAS;
  325. else
  326. return service
  327. end
  328. end
  329.  
  330. local new = Instance.new;
  331. Instance = {}
  332. Instance.new = function(inst,obje)
  333. local lp = GetService(oldGame,'Players').localPlayer
  334. local instance = new(inst)
  335. if(inst=='ObjectValue')then
  336. local fake = newproxy(true)
  337. getmetatable(fake).__index=function(self,index)
  338. if(self==fake)then self=instance end
  339. return self[index]
  340. end
  341. getmetatable(fake).__newindex=function(self,index,value)
  342. if(self==fake)then self=instance end
  343. if(index=='Value' and typeof(value)~='Instance' and value==fakePlayer)then
  344. self[index]=oPlayer
  345. else
  346. self[index]=value
  347. end
  348. end
  349. getmetatable(fake).__call=function(self,...)
  350. if(self == fake)then self = instance end
  351. local wh = {...}
  352. local name = table.remove(wh,1)
  353. for i,v in next, wh do
  354. if(v == fake)then v = instance end
  355. wh[i]=v
  356. end
  357. return self(name,unpack(wh))
  358. end
  359. getmetatable(fake). __namecall=function(self,...)
  360. if(self == fake)then self = instance end
  361. local tuple={...}
  362. local name = table.remove(tuple,#tuple)
  363. return self[name](self,unpack(tuple))
  364. end
  365. return fake
  366. else
  367. instance.Parent = obje
  368. return instance;
  369. end
  370.  
  371. end
  372. local serviceFunctions={
  373. service=true,
  374. GetService=true,
  375. }
  376. local fakeGame = newproxy(true)
  377. getmetatable(fakeGame).__index = function(s,i)
  378. if(s == fakeGame)then s=oldGame end
  379. local serv = GetService(oldGame,i)
  380. if serviceFunctions[i] then
  381. return GetService
  382. elseif(serv)then
  383. return serv
  384. else
  385. return s[i]
  386. end
  387. end
  388. getmetatable(fakeGame).__newindex = function(s,i,v)
  389. if(s == fakeGame)then s=oldGame end
  390. s[i]=v
  391. end
  392. getmetatable(fakeGame).__call=function(self,...)
  393. if(self == fakeGame)then self = oldGame end
  394. local wh = {...}
  395. local name = table.remove(wh,1)
  396. for i,v in next, wh do
  397. if(v == fakeGame)then v = oldGame end
  398. wh[i]=v
  399. end
  400. if serviceFunctions[name] then
  401. return GetService(self,unpack(wh))
  402. else
  403. return self(name,unpack(wh))
  404. end
  405. end
  406. getmetatable(fakeGame). __namecall=function(self,...)
  407. if(self == fakeGame)then self = oldGame end
  408. local tuple={...}
  409. local name = table.remove(tuple,#tuple)
  410.  
  411. local funcToCall=self[name]
  412.  
  413. if serviceFunctions[name] then
  414. return GetService(self,unpack(tuple))
  415. else
  416. return self[name](self,unpack(tuple))
  417. end
  418. end
  419. getmetatable(fakeGame).__metatable = 'gay'
  420.  
  421. coroutine.wrap(function()
  422. while true do
  423. Run:TrigEvent('RenderStepped')
  424. swait()
  425. end
  426. end)()
  427. game=fakeGame
  428. UserInputService,ContextActionService = UsIS,CoAS
  429. end
  430. -- PUT SCRIPT UNDER THIS LINE OF CODE AND UPLOAD IT TO ROBLOX TO CONVERT IT DONT MESS WITH THE CODE PLEASE
  431.  
  432. plr = game:GetService('Players').LocalPlayer
  433. mouse = game.Players.LocalPlayer:GetMouse()
  434. char = plr.Character
  435. lleg,rleg,larm,rarm,hed = char["Left Leg"],char["Right Leg"],char["Left Arm"],char["Right Arm"],char["Head"]
  436. rutprt,torso = char.HumanoidRootPart,char.Torso
  437. otheranims,swimming,hum,stopanim,cooldown = false,false,char:FindFirstChildOfClass'Humanoid',false,false
  438. TweenService = game:GetService("TweenService")
  439. stopanim2 = false -- larm
  440. stopanim3 = false -- head
  441.  
  442. hammer = Instance.new('Part', char)
  443. hammer.Name = "Hammer"
  444. hammer.CanCollide = true
  445. hammer.Position = char.Head.Position
  446. hammer.Size = Vector3.new(1.71, 1.31, 3.2)
  447. hammer.Locked = true
  448. mesh = Instance.new('SpecialMesh', hammer)
  449. mesh.MeshId = "rbxassetid://12592754"
  450. mesh.TextureId = "rbxassetid://12592745"
  451. mesh.Scale = Vector3.new(1.05, 1.05, 1.05)
  452.  
  453. fx = Instance.new('Part', char)
  454. fx.Anchored = false
  455. fx.CanCollide = false
  456. fx.Transparency = 1
  457. fx.Size = Vector3.new(1.77, 0.85, 1.05)
  458. weld = Instance.new('Weld', fx)
  459. weld.Part0 = fx
  460. weld.Part1 = hammer
  461. weld.C0 = CFrame.new(0, 0, -1.2)
  462.  
  463. func = hammer.Touched:connect(function(hit)
  464. if not hit.Parent:FindFirstChildOfClass'Humanoid' then
  465. wait(1)
  466. hammer.Anchored = true
  467. func:disconnect()
  468. end
  469. end)
  470.  
  471. function gettorso(a)
  472. return a:FindFirstChild'Torso' or a:FindFirstChild'UpperTorso' or a:FindFirstChild'LowerTorso' or a:FindFirstChild'HumanoidRootPart'
  473. end
  474.  
  475. ------------------------------------------------------------------------
  476. -- Animate Stuff --
  477. ------------------------------------------------------------------------
  478. char.Animate.Disabled=true
  479. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  480. local RunSpeed=30
  481.  
  482. local WlkSpeed=16
  483. local SwimSpeed=14
  484. local SwimDashSpeed=28
  485. local anim = "Idling"
  486. local lastanim = "Idling"
  487. local val = 0
  488. local syne = 0
  489. local num = 0
  490. local runtime = 0
  491. local pseudohead=hed:Clone()
  492. for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
  493. pseudohead.Name='PseudoHead'
  494. pseudohead.Parent=char.Head
  495. local pseudoweld=Instance.new('Weld',torso)
  496. pseudoweld.Part0=hed
  497. pseudoweld.Name='PseudoHedWld'
  498. pseudoweld.Part1=pseudohead
  499. hed.Transparency=1
  500.  
  501. coroutine.wrap(function() for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  502.  
  503. function Lerp(a, b, i)
  504. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  505. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  506. local calx = com1[1] + (com2[1] - com1[1]) * i
  507. local caly = com1[2] + (com2[2] - com1[2]) * i
  508. local calz = com1[3] + (com2[3] - com1[3]) * i
  509. local cala = com1[4] + (com2[4] - com1[4]) * i
  510. local calb = com1[5] + (com2[5] - com1[5]) * i
  511. local calc = com1[6] + (com2[6] - com1[6]) * i
  512. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  513. end
  514.  
  515. function TwnSingleNumber(s,f,m)
  516. local wot=s+(f-s)*m
  517. return wot
  518. end
  519.  
  520. function TwnVector3(q,w,e)
  521. local begin={q.x,q.y,q.z}
  522. local ending={w.x,w.y,w.z}
  523. local bgx=begin[1]+(ending[1]-begin[1])*e
  524. local bgy=begin[2]+(ending[2]-begin[2])*e
  525. local bgz=begin[3]+(ending[3]-begin[3])*e
  526. return Vector3.new(bgx,bgy,bgz)
  527. end
  528.  
  529. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  530. wld = Instance.new("Weld", wp1)
  531. wld.Part0 = wp0
  532. wld.Part1 = wp1
  533. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  534. end
  535.  
  536. local angles = CFrame.Angles
  537. function clerp(a, b, t)
  538. return a:lerp(b, t)
  539. end
  540.  
  541. newWeld(law, torso, larm, -1.5, 0.5, 0)
  542. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  543. newWeld(llw, torso, lleg, -.5, -2, 0)
  544. newWeld(rlw, torso, rleg, .5, -2, 0)
  545. newWeld(hw, torso, hed, 0, 1.5, 0)
  546. local rutwald=Instance.new('Weld',rutprt)
  547. rutwald.Part0=rutprt
  548. rutwald.Part1=torso
  549. rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  550. larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  551. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  552. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  553. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  554.  
  555. ------------------------------------------------------------------------
  556. -- idk --
  557. ------------------------------------------------------------------------
  558.  
  559. wind = Instance.new('Sound', hammer)
  560. wind.SoundId = "rbxassetid://866649671"
  561. wind.PlaybackSpeed = 1.5
  562. wind.Volume = 1
  563. wind.Looped = true
  564.  
  565. grab = Instance.new('Sound', rarm)
  566. grab.SoundId = "rbxassetid://1296135936"
  567. grab.Volume = 1
  568. grab.Looped = false
  569.  
  570. drop = Instance.new('Sound', hammer)
  571. drop.SoundId = "rbxassetid://873196972"
  572. drop.Volume = 1
  573. drop.Looped = false
  574.  
  575. ghit = Instance.new('Sound', hammer)
  576. ghit.SoundId = "rbxassetid://873196789"
  577. ghit.Volume = 5
  578. ghit.Looped = false
  579.  
  580. gyro = Instance.new('BodyGyro', hammer)
  581. gyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  582. gyro.CFrame = CFrame.Angles(math.rad(90), 0, 0)
  583.  
  584. holding = false
  585.  
  586. fakearm = rarm:Clone()
  587. fakearm.Name = "fakearm"
  588. fakearm:ClearAllChildren''
  589. fakearm.Parent = char
  590. fakearm.Transparency = 1
  591. fakearm.CanCollide = false
  592. weld = Instance.new('Weld', fakearm)
  593. weld.Part0 = fakearm
  594. weld.Part1 = rarm
  595. weld.C0 = CFrame.new(0, 0, 1)
  596.  
  597. ------------------------------------------------------------------------
  598. -- Lightning --
  599. ------------------------------------------------------------------------
  600.  
  601. Part0 = Instance.new("Part")
  602. ParticleEmitter1 = Instance.new("ParticleEmitter")
  603. Part0.Name = "lightning"
  604. Part0.Parent = nil
  605. Part0.Transparency = 1
  606. Part0.FormFactor = Enum.FormFactor.Symmetric
  607. Part0.Size = Vector3.new(0.820000052, 1.76999962, 2)
  608. Part0.CFrame = CFrame.new(26.3400002, 0.884999812, 44.9500122, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  609. Part0.Position = Vector3.new(26.3400002, 0.884999812, 44.9500122)
  610. ParticleEmitter1.Name = "Lightning"
  611. ParticleEmitter1.Parent = Part0
  612. ParticleEmitter1.Rotation = NumberRange.new(0, 360)
  613. ParticleEmitter1.Size = NumberSequence.new(1.0429447889328,3.3742332458496,0,3.3435583114624,0,3.3742332458496,0,3.6503071784973,0.030674934387207,3.7730062007904,0,3.8036811351776,0,3.8343560695648,0,3)
  614. ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1))
  615. ParticleEmitter1.LightEmission = 1
  616. ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=243098098"
  617. ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
  618. ParticleEmitter1.Rate = 12312311808
  619. ParticleEmitter1.Speed = NumberRange.new(0, 0)
  620. ParticleEmitter1.Enabled = true
  621. ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1))
  622.  
  623. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  624. local magz = (Part0 - Part1).magnitude
  625. local curpos = Part0
  626. local trz = {-Offset,Offset}
  627. for i=1,Times do
  628. local li = Instance.new("Part", torso)
  629. li.Name = "Lightning"
  630. li.TopSurface =0
  631. li.Material = "Neon"
  632. li.BottomSurface = 0
  633. li.Anchored = true
  634. li.Locked = true
  635. li.Transparency = Trans or 0.4
  636. li.BrickColor = BrickColor.new(Color)
  637. li.formFactor = "Custom"
  638. li.CanCollide = false
  639. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  640. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  641. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  642.  
  643. if Times == i then
  644. local magz2 = (curpos - Part1).magnitude
  645. li.Size = Vector3.new(Thickness,Thickness,magz2)
  646. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  647. else
  648. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  649. end
  650.  
  651. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  652. game.Debris:AddItem(li,.1)
  653. end
  654. end
  655.  
  656. BodyParts = {}
  657. Bounding = {}
  658. --table.insert(BodyParts, fx)
  659.  
  660. for _, v in pairs(BodyParts) do
  661. local temp = {X=nil, Y=nil, Z=nil}
  662. temp.X = v.Size.X/2 * 10
  663. temp.Y = v.Size.Y/2 * 10
  664. temp.Z = v.Size.Z/2 * 10
  665. Bounding[v.Name] = temp
  666. end
  667.  
  668. spawn(function()
  669. while wait(math.random(1,7)/10) do
  670. if #BodyParts ~= 0 and #Bounding ~= 0 then
  671. local Body1 = BodyParts[math.random(#BodyParts)]
  672. local Body2 = BodyParts[math.random(#BodyParts)]
  673. local Pos1 = Vector3.new(
  674. math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10,
  675. math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10,
  676. math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10
  677. )
  678. local Pos2 = Vector3.new(
  679. math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10,
  680. math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10,
  681. math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10
  682. )
  683. local SPos1 = Body1.Position + Pos1
  684. local SPos2 = Body2.Position + Pos2
  685. Lightning(SPos1, SPos2, 4, 3, "Cyan", .3, .56)
  686. end
  687. end
  688. end)
  689.  
  690. ------------------------------------------------------------------------
  691. -- Keys --
  692. ------------------------------------------------------------------------
  693.  
  694. using = false
  695.  
  696. function weldhammer()
  697. hammer.Anchored = false
  698. hammer.CanCollide = false
  699. grab:Play()
  700. weld = Instance.new('Weld', hammer)
  701. weld.Part0 = rarm
  702. weld.Part1 = hammer
  703. weld.C0 = CFrame.new(0, -0.6, -0.7) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90))
  704. end
  705.  
  706. function gethammer()
  707. if (fakearm.Position - hammer.Position).magnitude >= 15 then
  708. stopanim = true
  709. using = true
  710. hammer.CanCollide = false
  711. hammer.Anchored = true
  712. wind:Play()
  713.  
  714. -- a = hammer.Touched:connect(function(hit)
  715. -- if hit.Parent:FindFirstChildOfClass'Humanoid' and hit.Parent.Name ~= plr.Name then
  716. -- ghit:Play()
  717. -- if hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 and hit.Parent:FindFirstChild'HumanoidRootPart' then
  718. -- hit.Parent:FindFirstChildOfClass'Humanoid':TakeDamage(hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth/2/2/2)
  719. -- elseif not hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 then
  720. -- hit.Parent:BreakJoints''
  721. -- elseif hit:IsA'Part' or hit:IsA'MeshPart' or hit:IsA'BasePart' or hit:IsA'UnionOperation' then
  722. -- hit.Anchored = false
  723. -- bv = Instance.new('BodyVelocity', hit)
  724. -- bv.MaxForce = Vector3.new(2e9, 2e9, 2e9)
  725. -- bv.Velocity = -hit.CFrame.lookVector * 50
  726. -- game:service'Debris':AddItem(bv, 0.2)
  727. -- end
  728. -- end
  729. -- end)
  730.  
  731. for i = 0,4 do
  732. wait()
  733. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(140)), .1)
  734. end
  735. repeat wait()
  736. hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .1)
  737. if (fakearm.Position - hammer.Position).magnitude >= 3 then
  738. wind.Volume = 3
  739. else
  740. wind.Volume = (fakearm.Position - hammer.Position).magnitude
  741. end
  742. until (fakearm.Position - hammer.Position).magnitude <= .7
  743.  
  744. a:disconnect()
  745. hammer.Anchored = false
  746. hammer.CanCollide = false
  747. weldhammer()
  748. wind:Stop()
  749. wait(.3)
  750. stopanim = false
  751. using = false
  752. end
  753. end
  754.  
  755. function drophammer()
  756. a = hammer.Touched:connect(function(hit)
  757. if not hit.Parent:FindFirstChildOfClass'Humanoid' then
  758. drop:Play()
  759. wait(1)
  760. hammer.Anchored = true
  761. a:disconnect()
  762. end
  763. end)
  764.  
  765. hammer.Anchored = false
  766. for _, a in pairs(hammer:children'') do
  767. if a:IsA'Weld' then
  768. a:Destroy''
  769. end
  770. end
  771. hammer.CanCollide = true
  772. end
  773.  
  774. function attacktargets()
  775. if #targets >= 1 and holding then
  776. using = true
  777. hum.WalkSpeed = 0
  778. hum.JumpPower = 0
  779.  
  780. for i = 1,75 do
  781. swait()
  782. larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
  783. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
  784. end
  785. hum.WalkSpeed = 16
  786. hum.JumpPower = 50
  787. hammer.Anchored = true
  788. for _, a in pairs(hammer:children'') do
  789. if a:IsA'Weld' then
  790. a:Destroy''
  791. end
  792. end
  793. hammer.CanCollide = false
  794. holding = false
  795. for _, a in pairs(targets) do
  796. ttorso = gettorso(a)
  797. if a ~= nil and gettorso(a) and a:FindFirstChildOfClass'Humanoid' then
  798. repeat wait() a:FindFirstChildOfClass'Humanoid'.WalkSpeed = 5 hammer.CFrame = clerp(hammer.CFrame, ttorso.CFrame * CFrame.Angles(0, math.rad(ttorso.CFrame.lookVector.Y), 0), 0.1) until (hammer.Position - ttorso.Position).magnitude <= 6
  799. a:BreakJoints''
  800. ghit:Play()
  801. end
  802. end
  803. for _, a in pairs(rotate) do
  804. if a ~= nil then
  805. a:Destroy''
  806. end
  807. end
  808. targets = {}
  809. rotate = {}
  810. hammer.CanCollide = false
  811.  
  812.  
  813.  
  814. stopanim = true
  815. hammer.CanCollide = false
  816. hammer.Anchored = true
  817. wind:Play()
  818.  
  819. for i = 0,4 do
  820. wait()
  821. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(140)), .1)
  822. end
  823. repeat wait()
  824. hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .13)
  825. if (fakearm.Position - hammer.Position).magnitude >= 3 then
  826. wind.Volume = 3
  827. else
  828. wind.Volume = (fakearm.Position - hammer.Position).magnitude
  829. end
  830. until (fakearm.Position - hammer.Position).magnitude <= .7
  831.  
  832. hammer.Anchored = false
  833. hammer.CanCollide = false
  834. weldhammer()
  835. wind:Stop()
  836. holding = true
  837. wait(.3)
  838. stopanim = false
  839. using = false
  840. end
  841. end
  842.  
  843. function bgrab()
  844. for _, a in pairs(workspace:children'') do
  845. if a:FindFirstChildOfClass'Humanoid' and gettorso(a) and a.Name ~= plr.Name then
  846. ttorso = gettorso(a)
  847. if (ttorso.Position - rutprt.Position).magnitude <= 3 then
  848. using = true
  849. target2 = a
  850. stopanim2 = true
  851. target:FindFirstChildOfClass'Humanoid'.WalkSpeed = 0
  852. target:FindFirstChildOfClass'Humanoid'.JumpPower = 0
  853. hum.WalkSpeed = 0
  854. hum.JumpPower = 0
  855. for i = 0,25 do
  856. swait()
  857. larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-1.5,.525,0) * CFrame.Angles(math.rad(100), math.rad(20), math.rad(20)), 0.1)
  858. end
  859. weld = Instance.new('Weld', rutprt)
  860. weld.Part0 = rutprt
  861. weld.Part1 = ttorso
  862. weld.C0 = CFrame.new(-0.5, 0, -1.2)
  863.  
  864. wait(.1)
  865.  
  866.  
  867. ttorso.Anchored = true
  868. b = Instance.new('Part', char)
  869. b.Anchored = true
  870. b.CanCollide = false
  871. b.Transparency = 1
  872. b.CFrame = hed.CFrame
  873. b.Position = hed.Position + Vector3.new(0, 50, 0) + hed.CFrame.lookVector * 500
  874.  
  875. d = Instance.new('Part', char)
  876. d.Anchored = true
  877. d.CanCollide = false
  878. d.Transparency = 1
  879. d.CFrame = hed.CFrame
  880. d.Position = hed.Position - Vector3.new(0, 5.6, 0) + hed.CFrame.lookVector * -45
  881.  
  882. wait(.5)
  883. for i = 1,75 do
  884. swait()
  885. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
  886. end
  887. drophammer()
  888. wind:Play()
  889.  
  890. repeat wait()
  891. hammer.Anchored = true
  892. hammer.CFrame = clerp(hammer.CFrame, b.CFrame, 0.1)
  893. wind.Volume = (hammer.Position - d.Position).magnitude
  894. until (hammer.Position - b.Position).magnitude <= 5
  895.  
  896. repeat wait()
  897. hammer.Anchored = true
  898. hammer.CFrame = clerp(hammer.CFrame, d.CFrame, 0.1)
  899. wind.Volume = (hammer.Position - d.Position).magnitude
  900. until (hammer.Position - d.Position).magnitude <= 45
  901.  
  902. target2:BreakJoints''
  903. ghit:Play()
  904. wind:Stop()
  905. wait(.1)
  906. stopanim2 = false
  907. hum.WalkSpeed = 16
  908. hum.JumpPower = 50
  909. b:Destroy''
  910. d:Destroy''
  911. hammer.Anchored = false
  912. weldhammer()
  913. grab:Play()
  914. using = false
  915. end
  916. end
  917. end
  918. end
  919.  
  920. function shield()
  921. using = true
  922. hum.WalkSpeed = 0
  923. hum.JumpPower = 0
  924. for i = 1,75 do
  925. swait()
  926. larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
  927. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
  928. end
  929. hum.WalkSpeed = 16
  930. hum.JumpPower = 50
  931. drophammer()
  932. hammer.Anchored = true
  933. hammer.CanCollide = true
  934. using = false
  935. end
  936.  
  937. function stopshield()
  938. gethammer()
  939. end
  940.  
  941. --function transform()
  942. -- stopanim = true
  943. -- stopanim3 = true
  944. -- hum.WalkSpeed = 0
  945. -- hum.JumpPower = 0
  946. -- for i = 0,7 do
  947. -- wait()
  948. -- hammer.Weld.C0 = clerp(hammer.Weld.C0, CFrame.new(0, -2.5, -0.7) * CFrame.Angles(math.rad(-85), math.rad(180), math.rad(90)), 0.1)
  949. -- rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-179), math.rad(0), math.rad(15)), 0.1)
  950. -- hed.Weld.C0 = clerp(hed.Weld.C0, hed.Weld.C0 * CFrame.new(0,0,0.2)*CFrame.Angles(math.rad(40), math.rad(0), math.rad(0)), 0.1)
  951. -- end
  952. -- a = Instance.new('Part', char)
  953. -- a.Name = "hello"
  954. -- a.Size = Vector3.new(0.2, 0.2, 0.2)
  955. -- a.Anchored = true
  956. -- a.CanCollide = false
  957. -- a.Position = hammer.Position + Vector3.new(0, 75, 0)
  958. --
  959. -- wait(3)
  960. -- table.insert(BodyParts, fx)
  961. -- wait(4)
  962. --
  963. -- spawn(function()
  964. -- for i = 0,45 do
  965. -- swait()
  966. -- hammer.Weld.C0 = clerp(hammer.Weld.C0, CFrame.new(0, -0.6, -0.7) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90)), 0.07)
  967. -- end
  968. -- end)
  969. --
  970. -- hum.WalkSpeed = 16
  971. -- hum.JumpPower = 50
  972. -- stopanim = false
  973. -- stopanim3 = false
  974. --end
  975.  
  976. ------------------------------------------------------------------------
  977. -- Target --
  978. ------------------------------------------------------------------------
  979.  
  980. bg = Instance.new('BillboardGui', plr.PlayerGui)
  981. bg.Size = UDim2.new(15, 0, 15, 0)
  982. bg.AlwaysOnTop = true
  983. il = Instance.new('ImageLabel', bg)
  984. il.Image = "rbxassetid://142406345"
  985. il.BackgroundTransparency = 1
  986. il.Size = UDim2.new(1, 0, 1, 0)
  987. il.ImageColor3 = Color3.new(0,0,0)
  988.  
  989. home = false
  990. down = false
  991. barrier = false
  992. targets = {}
  993. rotate = {}
  994.  
  995. mouse.KeyDown:connect(function(k)
  996. key = k:lower()
  997. if key == "g" and not barrier and not using then
  998. attacktargets()
  999. end
  1000.  
  1001. if key == "e" and not cooldown and not barrier and not using then
  1002. cooldown = true
  1003. if not holding and (fakearm.Position - hammer.Position).magnitude >= 15 then
  1004. holding = true
  1005. gethammer()
  1006. elseif holding then
  1007. holding = false
  1008. drophammer()
  1009. end
  1010. wait(.3)
  1011. cooldown = false
  1012. end
  1013.  
  1014. if key == "q" and not cooldown and holding and not barrier and not using then
  1015. cooldown = true
  1016. using = true
  1017. hum.WalkSpeed = 0
  1018. hum.JumpPower = 0
  1019. for i = 1,75 do
  1020. swait()
  1021. larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
  1022. rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
  1023. end
  1024. hum.WalkSpeed = 16
  1025. hum.JumpPower = 50
  1026. holding = false
  1027. drophammer()
  1028. for i = 1,25 do
  1029. wait()
  1030. hammer.CFrame = clerp(hammer.CFrame, CFrame.new(9999,0,9999), 0.1)
  1031. end
  1032. wait(.5)
  1033. cooldown = false
  1034. using = false
  1035. end
  1036.  
  1037. if key == "f" and holding and not cooldown and not barrier and not using then
  1038. cooldown = true
  1039. bgrab()
  1040. wait(.2)
  1041. cooldown = false
  1042. end
  1043.  
  1044. if key == "v" and holding and not using then
  1045. if not barrier then
  1046. shield()
  1047. barrier = true
  1048. else
  1049. barrier = false
  1050. stopshield()
  1051. end
  1052. end
  1053. end)
  1054.  
  1055. mouse.Button1Down:connect(function()
  1056. if home and holding then
  1057. clone = bg:clone()
  1058. clone.Parent = plr.PlayerGui
  1059. clone.ImageLabel.ImageColor3 = Color3.new(255,255,255)
  1060. clone.Name = "hi"
  1061. if gettorso(mouse.Target.Parent) then
  1062. clone.Adornee = gettorso(mouse.Target.Parent)
  1063. table.insert(targets, mouse.Target.Parent)
  1064. table.insert(rotate, clone)
  1065. elseif not gettorso(mouse.Target.Parent) then
  1066. clone:Destroy''
  1067. end
  1068. end
  1069. end)
  1070.  
  1071. spawn(function()
  1072. while wait() do
  1073.  
  1074. il.Rotation = il.Rotation + 5
  1075. if holding and mouse.Target and mouse.Target.Parent and gettorso(mouse.Target.Parent) and mouse.Target.Parent:FindFirstChildOfClass'Humanoid' and mouse.Target.Parent:FindFirstChildOfClass'Humanoid'.Health ~= 0 then
  1076. target = mouse.Target.Parent
  1077.  
  1078. home = true
  1079. il.ImageTransparency = 0
  1080. bg.Adornee = gettorso(target)
  1081. elseif not mouse.Target then
  1082. il.ImageTransparency = 1
  1083. home = false
  1084. elseif not mouse.Target.Parent then
  1085. il.ImageTransparency = 1
  1086. home = false
  1087. elseif not mouse.Target.Parent:FindFirstChildOfClass'Humanoid' then
  1088. il.ImageTransparency = 1
  1089. home = false
  1090. end
  1091.  
  1092. end
  1093. end)
  1094.  
  1095. spawn(function()
  1096. while wait() do
  1097. for _, a in pairs(rotate) do
  1098. if a ~= nil then
  1099. a.ImageLabel.Rotation = a.ImageLabel.Rotation + 5
  1100. elseif targets <= 0 then
  1101. a:Destroy''
  1102. end
  1103. end
  1104. end
  1105. end)
  1106.  
  1107. ------------------------------------------------------------------------
  1108. -- Manual Pickup --
  1109. ------------------------------------------------------------------------
  1110.  
  1111. hammer.Touched:connect(function(hit)
  1112. if not holding and not using and hammer.Anchored and hit.Parent.Name == plr.Name then
  1113. holding = true
  1114. hammer.Anchored = false
  1115. hammer.CanCollide = false
  1116. weldhammer()
  1117. end
  1118. end)
  1119.  
  1120. ------------------------------------------------------------------------
  1121. -- Important functions --
  1122. ------------------------------------------------------------------------
  1123.  
  1124. died = false
  1125.  
  1126. function swait(num)
  1127. if num == 0 or num == nil then
  1128. game:service("RunService").Stepped:wait(0)
  1129. else
  1130. for i = 0, num do
  1131. game:service("RunService").Stepped:wait(0)
  1132. end
  1133. end
  1134. end
  1135.  
  1136. spawn(function()
  1137. while wait() do
  1138. if holding and hammer:FindFirstChildOfClass'Weld' then
  1139. hammer.Anchored = false
  1140. end
  1141. end
  1142. end)
  1143.  
  1144. x = 0
  1145. spawn(function()
  1146. while wait() do
  1147. if barrier then
  1148. x = x + 0.6
  1149. hammer.CFrame = rutprt.CFrame * CFrame.Angles(0,0.1-x,0) * CFrame.new(25,0,0)
  1150.  
  1151. for _, a in pairs(workspace:children'') do
  1152. ttorso = gettorso(a)
  1153. if a:FindFirstChildOfClass'Humanoid' and a:FindFirstChildOfClass'Humanoid'.Health ~= 0 and a.Name ~= plr.Name and gettorso(a) and (ttorso.Position - hammer.Position).magnitude <= 15 then
  1154. a:BreakJoints''
  1155. ghit:Play()
  1156. elseif a:FindFirstChildOfClass'Humanoid' and not gettorso(a) then
  1157. a:BreakJoints''
  1158. end
  1159. end
  1160.  
  1161. for _, a in pairs(workspace:children'') do
  1162. ttorso = gettorso(a)
  1163. if a:FindFirstChildOfClass'Humanoid' and a:FindFirstChildOfClass'Humanoid'.Health ~= 0 and a.Name ~= plr.Name and gettorso(a) and (ttorso.Position - rutprt.Position).magnitude <= 10 then
  1164. a:BreakJoints''
  1165. ghit:Play()
  1166. elseif a:FindFirstChildOfClass'Humanoid' and not a:FindFirstChild'HumanoidRootPart' then
  1167. a:BreakJoints''
  1168. end
  1169. end
  1170.  
  1171. if x == 1 then
  1172. x = 0.1
  1173. end
  1174. end
  1175. end
  1176. end)
  1177.  
  1178. ------------------------------------------------------------------------
  1179. -- Animations --
  1180. ------------------------------------------------------------------------
  1181.  
  1182. while true do
  1183. swait()
  1184.  
  1185. if holding then
  1186. gyro.Parent = nil
  1187. elseif not holding then
  1188. gyro.Parent = hammer
  1189. gyro.Name = "hamma"
  1190. end
  1191.  
  1192. ypcall(function()
  1193. if anim~=lastanim then
  1194. runtime=0
  1195. end
  1196. lastanim=anim
  1197. hum.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  1198. syne=syne+.95
  1199. if not otheranims and not swimming then
  1200. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1201. anim="Idling"
  1202. elseif hum.FloorMaterial ~= Enum.Material.Air and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1203. anim="Walking"
  1204. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1205. anim="Sprinting"
  1206. elseif torso.Velocity.y < -1 then
  1207. anim='Falling'
  1208. end
  1209. end
  1210.  
  1211. if anim=="Idling" and hum.WalkSpeed ~= 0 then
  1212. idlesineinc=35
  1213.  
  1214. if not stopanim then
  1215. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(1),math.rad(0),math.rad(6)),.1)
  1216. end
  1217.  
  1218. if not stopanim2 then
  1219. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(0),0,math.rad(-6)),.1)
  1220. end
  1221.  
  1222. if not stopanim3 then
  1223. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
  1224. end
  1225.  
  1226. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
  1227. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
  1228. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(0),math.rad(0)),.1)
  1229. end
  1230.  
  1231. if anim=="Walking" and hum.WalkSpeed ~= 0 then
  1232. if not stopanim then
  1233. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(math.cos(syne/6)/1.25,math.rad(5),-(math.cos(syne/6.75)/15)+math.rad(3)),.1)
  1234. end
  1235.  
  1236. if not stopanim2 then
  1237. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(-(math.cos(syne/6)/1.25),0,-(math.cos(syne/6.75)/15)-math.rad(3)),.1)
  1238. end
  1239.  
  1240. if not stopanim3 then
  1241. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
  1242. end
  1243.  
  1244. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
  1245. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
  1246. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-3.5),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
  1247. end
  1248.  
  1249. if hum.WalkSpeed == 0 then
  1250. if not stopanim then
  1251. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(1),math.rad(0),math.rad(6)),.1)
  1252. end
  1253.  
  1254. if not stopanim2 then
  1255. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(0),0,math.rad(-6)),.1)
  1256. end
  1257.  
  1258. if not stopanim3 then
  1259. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
  1260. end
  1261.  
  1262. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
  1263. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
  1264. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(0),math.rad(0)),.1)
  1265. end
  1266.  
  1267. if 1 < rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air and hum.JumpPower ~= 0 then
  1268. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065)
  1269. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.1)
  1270. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.1)
  1271. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.1)
  1272. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.1)
  1273. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.1)
  1274. elseif -1 > rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air then
  1275. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065)
  1276. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.06)
  1277. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.06)
  1278. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.06)
  1279. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.06)
  1280. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.06)
  1281. end
  1282. end)
  1283. end
  1284. end))
  1285. LocalScript1.Name = "FakeMouse"
  1286. LocalScript1.Parent = Script0
  1287. table.insert(cors,sandbox(LocalScript1,function()
  1288. local me = game:service'Players'.localPlayer;
  1289. local mouse = me:GetMouse();
  1290. local UIS = game:service'UserInputService'
  1291. local ch = me.Character;
  1292.  
  1293. local UserEvent = ch:WaitForChild('UserInputEvent',30)
  1294.  
  1295. UIS.InputChanged:connect(function(io,gpe)
  1296. if(io.UserInputType == Enum.UserInputType.MouseMovement)then
  1297. UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit}
  1298. end
  1299. end)
  1300.  
  1301. mouse.Changed:connect(function(o)
  1302. if(o == 'Target' or o == 'Hit')then
  1303. UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit}
  1304. end
  1305. end)
  1306.  
  1307. UIS.InputBegan:connect(function(io,gpe)
  1308. if(gpe)then return end
  1309. UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  1310. end)
  1311.  
  1312. UIS.InputEnded:connect(function(io,gpe)
  1313. if(gpe)then return end
  1314. UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  1315. end)
  1316.  
  1317. mouse.KeyDown:connect(function(k)
  1318. UserEvent:FireServer{KeyEvent='Down',Key=k}
  1319. end)
  1320.  
  1321. mouse.KeyUp:connect(function(k)
  1322. UserEvent:FireServer{KeyEvent='Up',Key=k}
  1323. end)
  1324.  
  1325. local ClientProp = ch:WaitForChild('GetClientProperty',30)
  1326.  
  1327. local sounds = {}
  1328.  
  1329.  
  1330. function regSound(o)
  1331. if(o:IsA'Sound')then
  1332.  
  1333. local lastLoudness = o.PlaybackLoudness
  1334. ClientProp:InvokeServer(o,lastLoudness)
  1335. table.insert(sounds,{o,lastLoudness})
  1336. --ClientProp:InvokeServer(o,o.PlaybackLoudness)
  1337. end
  1338. end
  1339.  
  1340. ClientProp.OnClientInvoke = function(inst,prop)
  1341. if(inst == 'RegSound')then
  1342. regSound(prop)
  1343. for i = 1, #sounds do
  1344. if(sounds[i][1] == prop)then
  1345. return sounds[i][2]
  1346. end
  1347. end
  1348. else
  1349. return inst[prop]
  1350. end
  1351. end
  1352.  
  1353. for _,v in next, workspace:GetDescendants() do regSound(v) end
  1354. workspace.DescendantAdded:connect(regSound)
  1355. me.Character.DescendantAdded:connect(regSound)
  1356.  
  1357. game:service'RunService'.RenderStepped:connect(function()
  1358. for i = 1, #sounds do
  1359. local tab = sounds[i]
  1360. local object,last=unpack(tab)
  1361. if(object.PlaybackLoudness ~= last)then
  1362. sounds[i][2]=object.PlaybackLoudness
  1363. ClientProp:InvokeServer(object,sounds[i][2])
  1364. end
  1365. end
  1366. end)
  1367. end))
  1368. for i,v in pairs(mas:GetChildren()) do
  1369. v.Parent = game.Players.Amilkzon.PlayerGui
  1370. pcall(function() v:MakeJoints() end)
  1371. end
  1372. mas:Destroy()
  1373. for i,v in pairs(cors) do
  1374. spawn(function()
  1375. pcall(v)
  1376. end)
  1377. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement