SHOW:
|
|
- or go back to the newest paste.
1 | ------------------------------------------------------------------------ | |
2 | -- Made by Cronizete -- | |
3 | ------------------------------------------------------------------------ | |
4 | ||
5 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
6 | - | do |
6 | + | |
7 | - | --print("FE Compatibility code by Mokiros") |
7 | + | local RealPlayer = Player |
8 | - | script.Parent = Player.Character |
8 | + | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end |
9 | ||
10 | - | --RemoteEvent for communicating |
10 | + | |
11 | - | local Event = Instance.new("RemoteEvent") |
11 | + | |
12 | - | Event.Name = "UserInput_Event" |
12 | + | |
13 | ||
14 | - | --Fake event to make stuff like Mouse.KeyDown work |
14 | + | |
15 | - | local function fakeEvent() |
15 | + | |
16 | - | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} |
16 | + | |
17 | - | t.connect = t.Connect |
17 | + | |
18 | - | return t |
18 | + | |
19 | TweenService = game:GetService("TweenService") | |
20 | stopanim2 = false -- larm | |
21 | - | --Creating fake input objects with fake variables |
21 | + | |
22 | - | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} |
22 | + | |
23 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
23 | + | |
24 | - | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) |
24 | + | |
25 | - | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil |
25 | + | |
26 | - | end} |
26 | + | |
27 | - | --Merged 2 functions into one by checking amount of arguments |
27 | + | |
28 | - | CAS.UnbindAction = CAS.BindAction |
28 | + | |
29 | mesh = Instance.new('SpecialMesh', hammer) | |
30 | - | --This function will trigger the events that have been :Connect()'ed |
30 | + | mesh.MeshId = "rbxassetid://3092672086" |
31 | - | local function te(self,ev,...) |
31 | + | mesh.TextureId = "rbxassetid://2988727630" |
32 | - | local t = m[ev] |
32 | + | |
33 | - | if t and t._fakeEvent and t.Function then |
33 | + | |
34 | - | t.Function(...) |
34 | + | |
35 | fx.Anchored = false | |
36 | fx.CanCollide = false | |
37 | - | m.TrigEvent = te |
37 | + | |
38 | - | UIS.TrigEvent = te |
38 | + | |
39 | weld = Instance.new('Weld', fx) | |
40 | - | Event.OnServerEvent:Connect(function(plr,io) |
40 | + | |
41 | - | if plr~=Player then return end |
41 | + | |
42 | - | if io.isMouse then |
42 | + | |
43 | - | m.Target = io.Target |
43 | + | |
44 | - | m.Hit = io.Hit |
44 | + | |
45 | if not hit.Parent:FindFirstChildOfClass'Humanoid' then | |
46 | - | local b = io.UserInputState == Enum.UserInputState.Begin |
46 | + | |
47 | - | if io.UserInputType == Enum.UserInputType.MouseButton1 then |
47 | + | |
48 | - | return m:TrigEvent(b and "Button1Down" or "Button1Up") |
48 | + | |
49 | end | |
50 | - | for _,t in pairs(CAS.Actions) do |
50 | + | |
51 | - | for _,k in pairs(t.Keys) do |
51 | + | |
52 | - | if k==io.KeyCode then |
52 | + | |
53 | - | t.Function(t.Name,io.UserInputState,io) |
53 | + | |
54 | - | end |
54 | + | |
55 | ||
56 | ------------------------------------------------------------------------ | |
57 | - | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
57 | + | |
58 | - | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) |
58 | + | |
59 | - | end |
59 | + | |
60 | local fldb={['w']=false,['a']=false,['s']=false,['d']=false} | |
61 | - | Event.Parent = NLS([==[ |
61 | + | |
62 | - | local Player = game:GetService("Players").LocalPlayer |
62 | + | |
63 | - | local Event = script:WaitForChild("UserInput_Event") |
63 | + | |
64 | local SwimSpeed=14 | |
65 | - | local UIS = game:GetService("UserInputService") |
65 | + | |
66 | - | local input = function(io,a) |
66 | + | |
67 | - | if a then return end |
67 | + | |
68 | - | --Since InputObject is a client-side instance, we create and pass table instead |
68 | + | |
69 | - | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) |
69 | + | |
70 | local num = 0 | |
71 | - | UIS.InputBegan:Connect(input) |
71 | + | |
72 | - | UIS.InputEnded:Connect(input) |
72 | + | |
73 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end | |
74 | - | local Mouse = Player:GetMouse() |
74 | + | |
75 | - | local h,t |
75 | + | |
76 | - | --Give the server mouse data 30 times every second, but only if the values changed |
76 | + | |
77 | - | --If player is not moving their mouse, client won't fire events |
77 | + | |
78 | - | while wait(1/30) do |
78 | + | |
79 | - | if h~=Mouse.Hit or t~=Mouse.Target then |
79 | + | |
80 | - | h,t=Mouse.Hit,Mouse.Target |
80 | + | |
81 | - | Event:FireServer({isMouse=true,Target=t,Hit=h}) |
81 | + | |
82 | coroutine.wrap(function() for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)() | |
83 | - | end]==],Player.Character) |
83 | + | |
84 | - | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS |
84 | + | |
85 | local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()} | |
86 | local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()} | |
87 | local calx = com1[1] + (com2[1] - com1[1]) * i | |
88 | local caly = com1[2] + (com2[2] - com1[2]) * i | |
89 | local calz = com1[3] + (com2[3] - com1[3]) * i | |
90 | local cala = com1[4] + (com2[4] - com1[4]) * i | |
91 | local calb = com1[5] + (com2[5] - com1[5]) * i | |
92 | local calc = com1[6] + (com2[6] - com1[6]) * i | |
93 | return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc) | |
94 | end | |
95 | ||
96 | function TwnSingleNumber(s,f,m) | |
97 | local wot=s+(f-s)*m | |
98 | return wot | |
99 | end | |
100 | ||
101 | function TwnVector3(q,w,e) | |
102 | local begin={q.x,q.y,q.z} | |
103 | local ending={w.x,w.y,w.z} | |
104 | local bgx=begin[1]+(ending[1]-begin[1])*e | |
105 | local bgy=begin[2]+(ending[2]-begin[2])*e | |
106 | local bgz=begin[3]+(ending[3]-begin[3])*e | |
107 | - | mesh.MeshId = "rbxassetid://12592754" |
107 | + | |
108 | - | mesh.TextureId = "rbxassetid://12592745" |
108 | + | |
109 | ||
110 | newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z) | |
111 | wld = Instance.new("Weld", wp1) | |
112 | wld.Part0 = wp0 | |
113 | wld.Part1 = wp1 | |
114 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
115 | end | |
116 | ||
117 | local angles = CFrame.Angles | |
118 | function clerp(a, b, t) | |
119 | return a:lerp(b, t) | |
120 | end | |
121 | ||
122 | newWeld(law, torso, larm, -1.5, 0.5, 0) | |
123 | newWeld(raw, torso, rarm, 1.5, 0.5, 0) | |
124 | newWeld(llw, torso, lleg, -.5, -2, 0) | |
125 | newWeld(rlw, torso, rleg, .5, -2, 0) | |
126 | newWeld(hw, torso, hed, 0, 1.5, 0) | |
127 | local rutwald=Instance.new('Weld',rutprt) | |
128 | rutwald.Part0=rutprt | |
129 | rutwald.Part1=torso | |
130 | rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0) | |
131 | larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
132 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
133 | rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
134 | lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
135 | ||
136 | ------------------------------------------------------------------------ | |
137 | -- idk -- | |
138 | ------------------------------------------------------------------------ | |
139 | ||
140 | wind = Instance.new('Sound', hammer) | |
141 | wind.SoundId = "rbxassetid://866649671" | |
142 | wind.PlaybackSpeed = 1.5 | |
143 | wind.Volume = 1 | |
144 | wind.Looped = true | |
145 | ||
146 | grab = Instance.new('Sound', rarm) | |
147 | grab.SoundId = "rbxassetid://1296135936" | |
148 | grab.Volume = 1 | |
149 | grab.Looped = false | |
150 | ||
151 | drop = Instance.new('Sound', hammer) | |
152 | drop.SoundId = "rbxassetid://873196972" | |
153 | drop.Volume = 1 | |
154 | drop.Looped = false | |
155 | ||
156 | ghit = Instance.new('Sound', hammer) | |
157 | ghit.SoundId = "rbxassetid://873196789" | |
158 | ghit.Volume = 5 | |
159 | ghit.Looped = false | |
160 | ||
161 | gyro = Instance.new('BodyGyro', hammer) | |
162 | gyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) | |
163 | gyro.CFrame = CFrame.Angles(math.rad(90), 0, 0) | |
164 | ||
165 | holding = false | |
166 | ||
167 | fakearm = rarm:Clone() | |
168 | fakearm.Name = "fakearm" | |
169 | fakearm:ClearAllChildren'' | |
170 | fakearm.Parent = char | |
171 | fakearm.Transparency = 1 | |
172 | fakearm.CanCollide = false | |
173 | weld = Instance.new('Weld', fakearm) | |
174 | weld.Part0 = fakearm | |
175 | weld.Part1 = rarm | |
176 | weld.C0 = CFrame.new(0, 0, 1) | |
177 | ||
178 | ------------------------------------------------------------------------ | |
179 | -- Lightning -- | |
180 | ------------------------------------------------------------------------ | |
181 | ||
182 | Part0 = Instance.new("Part") | |
183 | ParticleEmitter1 = Instance.new("ParticleEmitter") | |
184 | Part0.Name = "lightning" | |
185 | Part0.Parent = nil | |
186 | Part0.Transparency = 1 | |
187 | Part0.FormFactor = Enum.FormFactor.Symmetric | |
188 | Part0.Size = Vector3.new(0.820000052, 1.76999962, 2) | |
189 | Part0.CFrame = CFrame.new(26.3400002, 0.884999812, 44.9500122, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
190 | Part0.Position = Vector3.new(26.3400002, 0.884999812, 44.9500122) | |
191 | ParticleEmitter1.Name = "Lightning" | |
192 | ParticleEmitter1.Parent = Part0 | |
193 | ParticleEmitter1.Rotation = NumberRange.new(0, 360) | |
194 | 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) | |
195 | ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1)) | |
196 | ParticleEmitter1.LightEmission = 1 | |
197 | ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=243098098" | |
198 | ParticleEmitter1.Lifetime = NumberRange.new(1, 1) | |
199 | ParticleEmitter1.Rate = 12312311808 | |
200 | ParticleEmitter1.Speed = NumberRange.new(0, 0) | |
201 | ParticleEmitter1.Enabled = true | |
202 | ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1)) | |
203 | ||
204 | function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) | |
205 | local magz = (Part0 - Part1).magnitude | |
206 | local curpos = Part0 | |
207 | local trz = {-Offset,Offset} | |
208 | for i=1,Times do | |
209 | local li = Instance.new("Part", torso) | |
210 | li.Name = "Lightning" | |
211 | li.TopSurface =0 | |
212 | li.Material = "Neon" | |
213 | li.BottomSurface = 0 | |
214 | li.Anchored = true | |
215 | li.Locked = true | |
216 | li.Transparency = Trans or 0.4 | |
217 | li.BrickColor = BrickColor.new(Color) | |
218 | li.formFactor = "Custom" | |
219 | li.CanCollide = false | |
220 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
221 | local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
222 | local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet | |
223 | ||
224 | if Times == i then | |
225 | local magz2 = (curpos - Part1).magnitude | |
226 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
227 | li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2) | |
228 | else | |
229 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
230 | end | |
231 | ||
232 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p | |
233 | game.Debris:AddItem(li,.1) | |
234 | end | |
235 | end | |
236 | ||
237 | BodyParts = {} | |
238 | Bounding = {} | |
239 | --table.insert(BodyParts, fx) | |
240 | ||
241 | for _, v in pairs(BodyParts) do | |
242 | local temp = {X=nil, Y=nil, Z=nil} | |
243 | temp.X = v.Size.X/2 * 10 | |
244 | temp.Y = v.Size.Y/2 * 10 | |
245 | temp.Z = v.Size.Z/2 * 10 | |
246 | Bounding[v.Name] = temp | |
247 | end | |
248 | ||
249 | spawn(function() | |
250 | while wait(math.random(1,7)/10) do | |
251 | if #BodyParts ~= 0 and #Bounding ~= 0 then | |
252 | local Body1 = BodyParts[math.random(#BodyParts)] | |
253 | local Body2 = BodyParts[math.random(#BodyParts)] | |
254 | local Pos1 = Vector3.new( | |
255 | math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10, | |
256 | math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10, | |
257 | math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10 | |
258 | ) | |
259 | local Pos2 = Vector3.new( | |
260 | math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10, | |
261 | math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10, | |
262 | math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10 | |
263 | ) | |
264 | local SPos1 = Body1.Position + Pos1 | |
265 | local SPos2 = Body2.Position + Pos2 | |
266 | Lightning(SPos1, SPos2, 4, 3, "Cyan", .3, .56) | |
267 | end | |
268 | end | |
269 | end) | |
270 | ||
271 | ------------------------------------------------------------------------ | |
272 | -- Keys -- | |
273 | ------------------------------------------------------------------------ | |
274 | ||
275 | using = false | |
276 | ||
277 | function weldhammer() | |
278 | hammer.Anchored = false | |
279 | hammer.CanCollide = false | |
280 | grab:Play() | |
281 | weld = Instance.new('Weld', hammer) | |
282 | weld.Part0 = rarm | |
283 | weld.Part1 = hammer | |
284 | weld.C0 = CFrame.new(0, -0.6, -0.7) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90)) | |
285 | end | |
286 | ||
287 | function gethammer() | |
288 | if (fakearm.Position - hammer.Position).magnitude >= 15 then | |
289 | stopanim = true | |
290 | using = true | |
291 | hammer.CanCollide = false | |
292 | hammer.Anchored = true | |
293 | wind:Play() | |
294 | ||
295 | -- a = hammer.Touched:connect(function(hit) | |
296 | -- if hit.Parent:FindFirstChildOfClass'Humanoid' and hit.Parent.Name ~= plr.Name then | |
297 | -- ghit:Play() | |
298 | -- if hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 and hit.Parent:FindFirstChild'HumanoidRootPart' then | |
299 | -- hit.Parent:FindFirstChildOfClass'Humanoid':TakeDamage(hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth/2/2/2) | |
300 | -- elseif not hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 then | |
301 | -- hit.Parent:BreakJoints'' | |
302 | -- elseif hit:IsA'Part' or hit:IsA'MeshPart' or hit:IsA'BasePart' or hit:IsA'UnionOperation' then | |
303 | -- hit.Anchored = false | |
304 | -- bv = Instance.new('BodyVelocity', hit) | |
305 | -- bv.MaxForce = Vector3.new(2e9, 2e9, 2e9) | |
306 | -- bv.Velocity = -hit.CFrame.lookVector * 50 | |
307 | -- game:service'Debris':AddItem(bv, 0.2) | |
308 | -- end | |
309 | -- end | |
310 | -- end) | |
311 | ||
312 | for i = 0,4 do | |
313 | wait() | |
314 | 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) | |
315 | end | |
316 | repeat wait() | |
317 | hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .1) | |
318 | if (fakearm.Position - hammer.Position).magnitude >= 3 then | |
319 | wind.Volume = 3 | |
320 | else | |
321 | wind.Volume = (fakearm.Position - hammer.Position).magnitude | |
322 | end | |
323 | until (fakearm.Position - hammer.Position).magnitude <= .7 | |
324 | ||
325 | a:disconnect() | |
326 | hammer.Anchored = false | |
327 | hammer.CanCollide = false | |
328 | weldhammer() | |
329 | wind:Stop() | |
330 | wait(.3) | |
331 | stopanim = false | |
332 | using = false | |
333 | end | |
334 | end | |
335 | ||
336 | function drophammer() | |
337 | a = hammer.Touched:connect(function(hit) | |
338 | if not hit.Parent:FindFirstChildOfClass'Humanoid' then | |
339 | drop:Play() | |
340 | wait(1) | |
341 | hammer.Anchored = true | |
342 | a:disconnect() | |
343 | end | |
344 | end) | |
345 | ||
346 | hammer.Anchored = false | |
347 | for _, a in pairs(hammer:children'') do | |
348 | if a:IsA'Weld' then | |
349 | a:Destroy'' | |
350 | end | |
351 | end | |
352 | hammer.CanCollide = true | |
353 | end | |
354 | ||
355 | function attacktargets() | |
356 | if #targets >= 1 and holding then | |
357 | using = true | |
358 | hum.WalkSpeed = 0 | |
359 | hum.JumpPower = 0 | |
360 | ||
361 | for i = 1,75 do | |
362 | swait() | |
363 | 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) | |
364 | 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) | |
365 | end | |
366 | hum.WalkSpeed = 16 | |
367 | hum.JumpPower = 50 | |
368 | hammer.Anchored = true | |
369 | for _, a in pairs(hammer:children'') do | |
370 | if a:IsA'Weld' then | |
371 | a:Destroy'' | |
372 | end | |
373 | end | |
374 | hammer.CanCollide = false | |
375 | holding = false | |
376 | for _, a in pairs(targets) do | |
377 | ttorso = gettorso(a) | |
378 | if a ~= nil and gettorso(a) and a:FindFirstChildOfClass'Humanoid' then | |
379 | 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 | |
380 | a:BreakJoints'' | |
381 | ghit:Play() | |
382 | end | |
383 | end | |
384 | for _, a in pairs(rotate) do | |
385 | if a ~= nil then | |
386 | a:Destroy'' | |
387 | end | |
388 | end | |
389 | targets = {} | |
390 | rotate = {} | |
391 | hammer.CanCollide = false | |
392 | ||
393 | ||
394 | ||
395 | stopanim = true | |
396 | hammer.CanCollide = false | |
397 | hammer.Anchored = true | |
398 | wind:Play() | |
399 | ||
400 | for i = 0,4 do | |
401 | wait() | |
402 | 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) | |
403 | end | |
404 | repeat wait() | |
405 | hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .13) | |
406 | if (fakearm.Position - hammer.Position).magnitude >= 3 then | |
407 | wind.Volume = 3 | |
408 | else | |
409 | wind.Volume = (fakearm.Position - hammer.Position).magnitude | |
410 | end | |
411 | until (fakearm.Position - hammer.Position).magnitude <= .7 | |
412 | ||
413 | hammer.Anchored = false | |
414 | hammer.CanCollide = false | |
415 | weldhammer() | |
416 | wind:Stop() | |
417 | holding = true | |
418 | wait(.3) | |
419 | stopanim = false | |
420 | using = false | |
421 | end | |
422 | end | |
423 | ||
424 | function bgrab() | |
425 | for _, a in pairs(workspace:children'') do | |
426 | if a:FindFirstChildOfClass'Humanoid' and gettorso(a) and a.Name ~= plr.Name then | |
427 | ttorso = gettorso(a) | |
428 | if (ttorso.Position - rutprt.Position).magnitude <= 3 then | |
429 | using = true | |
430 | target2 = a | |
431 | stopanim2 = true | |
432 | target:FindFirstChildOfClass'Humanoid'.WalkSpeed = 0 | |
433 | target:FindFirstChildOfClass'Humanoid'.JumpPower = 0 | |
434 | hum.WalkSpeed = 0 | |
435 | hum.JumpPower = 0 | |
436 | for i = 0,25 do | |
437 | swait() | |
438 | 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) | |
439 | end | |
440 | weld = Instance.new('Weld', rutprt) | |
441 | weld.Part0 = rutprt | |
442 | weld.Part1 = ttorso | |
443 | weld.C0 = CFrame.new(-0.5, 0, -1.2) | |
444 | ||
445 | wait(.1) | |
446 | ||
447 | ||
448 | ttorso.Anchored = true | |
449 | b = Instance.new('Part', char) | |
450 | b.Anchored = true | |
451 | b.CanCollide = false | |
452 | b.Transparency = 1 | |
453 | b.CFrame = hed.CFrame | |
454 | b.Position = hed.Position + Vector3.new(0, 50, 0) + hed.CFrame.lookVector * 500 | |
455 | ||
456 | d = Instance.new('Part', char) | |
457 | d.Anchored = true | |
458 | d.CanCollide = false | |
459 | d.Transparency = 1 | |
460 | d.CFrame = hed.CFrame | |
461 | d.Position = hed.Position - Vector3.new(0, 5.6, 0) + hed.CFrame.lookVector * -45 | |
462 | ||
463 | wait(.5) | |
464 | for i = 1,75 do | |
465 | swait() | |
466 | 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) | |
467 | end | |
468 | drophammer() | |
469 | wind:Play() | |
470 | ||
471 | repeat wait() | |
472 | hammer.Anchored = true | |
473 | hammer.CFrame = clerp(hammer.CFrame, b.CFrame, 0.1) | |
474 | wind.Volume = (hammer.Position - d.Position).magnitude | |
475 | until (hammer.Position - b.Position).magnitude <= 5 | |
476 | ||
477 | repeat wait() | |
478 | hammer.Anchored = true | |
479 | hammer.CFrame = clerp(hammer.CFrame, d.CFrame, 0.1) | |
480 | wind.Volume = (hammer.Position - d.Position).magnitude | |
481 | until (hammer.Position - d.Position).magnitude <= 45 | |
482 | ||
483 | target2:BreakJoints'' | |
484 | ghit:Play() | |
485 | wind:Stop() | |
486 | wait(.1) | |
487 | stopanim2 = false | |
488 | hum.WalkSpeed = 16 | |
489 | hum.JumpPower = 50 | |
490 | b:Destroy'' | |
491 | d:Destroy'' | |
492 | hammer.Anchored = false | |
493 | weldhammer() | |
494 | grab:Play() | |
495 | using = false | |
496 | end | |
497 | end | |
498 | end | |
499 | end | |
500 | ||
501 | function shield() | |
502 | using = true | |
503 | hum.WalkSpeed = 0 | |
504 | hum.JumpPower = 0 | |
505 | for i = 1,75 do | |
506 | swait() | |
507 | 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) | |
508 | 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) | |
509 | end | |
510 | hum.WalkSpeed = 16 | |
511 | hum.JumpPower = 50 | |
512 | drophammer() | |
513 | hammer.Anchored = true | |
514 | hammer.CanCollide = true | |
515 | using = false | |
516 | end | |
517 | ||
518 | function stopshield() | |
519 | gethammer() | |
520 | end | |
521 | ||
522 | --function transform() | |
523 | -- stopanim = true | |
524 | -- stopanim3 = true | |
525 | -- hum.WalkSpeed = 0 | |
526 | -- hum.JumpPower = 0 | |
527 | -- for i = 0,7 do | |
528 | -- wait() | |
529 | -- 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) | |
530 | -- 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) | |
531 | -- 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) | |
532 | -- end | |
533 | -- a = Instance.new('Part', char) | |
534 | -- a.Name = "hello" | |
535 | -- a.Size = Vector3.new(0.2, 0.2, 0.2) | |
536 | -- a.Anchored = true | |
537 | -- a.CanCollide = false | |
538 | -- a.Position = hammer.Position + Vector3.new(0, 75, 0) | |
539 | -- | |
540 | -- wait(3) | |
541 | -- table.insert(BodyParts, fx) | |
542 | -- wait(4) | |
543 | -- | |
544 | -- spawn(function() | |
545 | -- for i = 0,45 do | |
546 | -- swait() | |
547 | -- 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) | |
548 | -- end | |
549 | -- end) | |
550 | -- | |
551 | -- hum.WalkSpeed = 16 | |
552 | -- hum.JumpPower = 50 | |
553 | -- stopanim = false | |
554 | -- stopanim3 = false | |
555 | --end | |
556 | ||
557 | ------------------------------------------------------------------------ | |
558 | -- Target -- | |
559 | ------------------------------------------------------------------------ | |
560 | ||
561 | bg = Instance.new('BillboardGui', plr.PlayerGui) | |
562 | bg.Size = UDim2.new(15, 0, 15, 0) | |
563 | bg.AlwaysOnTop = true | |
564 | il = Instance.new('ImageLabel', bg) | |
565 | il.Image = "rbxassetid://142406345" | |
566 | il.BackgroundTransparency = 1 | |
567 | il.Size = UDim2.new(1, 0, 1, 0) | |
568 | il.ImageColor3 = Color3.new(0,0,0) | |
569 | ||
570 | home = false | |
571 | down = false | |
572 | barrier = false | |
573 | targets = {} | |
574 | rotate = {} | |
575 | ||
576 | mouse.KeyDown:connect(function(k) | |
577 | key = k:lower() | |
578 | if key == "g" and not barrier and not using then | |
579 | attacktargets() | |
580 | end | |
581 | ||
582 | if key == "e" and not cooldown and not barrier and not using then | |
583 | cooldown = true | |
584 | if not holding and (fakearm.Position - hammer.Position).magnitude >= 15 then | |
585 | holding = true | |
586 | gethammer() | |
587 | elseif holding then | |
588 | holding = false | |
589 | drophammer() | |
590 | end | |
591 | wait(.3) | |
592 | cooldown = false | |
593 | end | |
594 | ||
595 | if key == "q" and not cooldown and holding and not barrier and not using then | |
596 | cooldown = true | |
597 | using = true | |
598 | hum.WalkSpeed = 0 | |
599 | hum.JumpPower = 0 | |
600 | for i = 1,75 do | |
601 | swait() | |
602 | 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) | |
603 | 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) | |
604 | end | |
605 | hum.WalkSpeed = 16 | |
606 | hum.JumpPower = 50 | |
607 | holding = false | |
608 | drophammer() | |
609 | for i = 1,25 do | |
610 | wait() | |
611 | hammer.CFrame = clerp(hammer.CFrame, CFrame.new(9999,0,9999), 0.1) | |
612 | end | |
613 | wait(.5) | |
614 | cooldown = false | |
615 | using = false | |
616 | end | |
617 | ||
618 | if key == "f" and holding and not cooldown and not barrier and not using then | |
619 | cooldown = true | |
620 | bgrab() | |
621 | wait(.2) | |
622 | cooldown = false | |
623 | end | |
624 | ||
625 | if key == "v" and holding and not using then | |
626 | if not barrier then | |
627 | shield() | |
628 | barrier = true | |
629 | else | |
630 | barrier = false | |
631 | stopshield() | |
632 | end | |
633 | end | |
634 | end) | |
635 | ||
636 | mouse.Button1Down:connect(function() | |
637 | if home and holding then | |
638 | clone = bg:clone() | |
639 | clone.Parent = plr.PlayerGui | |
640 | clone.ImageLabel.ImageColor3 = Color3.new(255,255,255) | |
641 | clone.Name = "hi" | |
642 | if gettorso(mouse.Target.Parent) then | |
643 | clone.Adornee = gettorso(mouse.Target.Parent) | |
644 | table.insert(targets, mouse.Target.Parent) | |
645 | table.insert(rotate, clone) | |
646 | elseif not gettorso(mouse.Target.Parent) then | |
647 | clone:Destroy'' | |
648 | end | |
649 | end | |
650 | end) | |
651 | ||
652 | spawn(function() | |
653 | while wait() do | |
654 | ||
655 | il.Rotation = il.Rotation + 5 | |
656 | 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 | |
657 | target = mouse.Target.Parent | |
658 | ||
659 | home = true | |
660 | il.ImageTransparency = 0 | |
661 | bg.Adornee = gettorso(target) | |
662 | elseif not mouse.Target then | |
663 | il.ImageTransparency = 1 | |
664 | home = false | |
665 | elseif not mouse.Target.Parent then | |
666 | il.ImageTransparency = 1 | |
667 | home = false | |
668 | elseif not mouse.Target.Parent:FindFirstChildOfClass'Humanoid' then | |
669 | il.ImageTransparency = 1 | |
670 | home = false | |
671 | end | |
672 | ||
673 | end | |
674 | end) | |
675 | ||
676 | spawn(function() | |
677 | while wait() do | |
678 | for _, a in pairs(rotate) do | |
679 | if a ~= nil then | |
680 | a.ImageLabel.Rotation = a.ImageLabel.Rotation + 5 | |
681 | elseif targets <= 0 then | |
682 | a:Destroy'' | |
683 | end | |
684 | end | |
685 | end | |
686 | end) | |
687 | ||
688 | ------------------------------------------------------------------------ | |
689 | -- Manual Pickup -- | |
690 | ------------------------------------------------------------------------ | |
691 | ||
692 | hammer.Touched:connect(function(hit) | |
693 | if not holding and not using and hammer.Anchored and hit.Parent.Name == plr.Name then | |
694 | holding = true | |
695 | hammer.Anchored = false | |
696 | hammer.CanCollide = false | |
697 | weldhammer() | |
698 | end | |
699 | end) | |
700 | ||
701 | ------------------------------------------------------------------------ | |
702 | -- Important functions -- | |
703 | ------------------------------------------------------------------------ | |
704 | ||
705 | died = false | |
706 | ||
707 | function swait(num) | |
708 | if num == 0 or num == nil then | |
709 | game:service("RunService").Stepped:wait(0) | |
710 | else | |
711 | for i = 0, num do | |
712 | game:service("RunService").Stepped:wait(0) | |
713 | end | |
714 | end | |
715 | end | |
716 | ||
717 | spawn(function() | |
718 | while wait() do | |
719 | if holding and hammer:FindFirstChildOfClass'Weld' then | |
720 | hammer.Anchored = false | |
721 | end | |
722 | end | |
723 | end) | |
724 | ||
725 | x = 0 | |
726 | spawn(function() | |
727 | while wait() do | |
728 | if barrier then | |
729 | x = x + 0.6 | |
730 | hammer.CFrame = rutprt.CFrame * CFrame.Angles(0,0.1-x,0) * CFrame.new(25,0,0) | |
731 | ||
732 | for _, a in pairs(workspace:children'') do | |
733 | ttorso = gettorso(a) | |
734 | 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 | |
735 | a:BreakJoints'' | |
736 | ghit:Play() | |
737 | elseif a:FindFirstChildOfClass'Humanoid' and not gettorso(a) then | |
738 | a:BreakJoints'' | |
739 | end | |
740 | end | |
741 | ||
742 | for _, a in pairs(workspace:children'') do | |
743 | ttorso = gettorso(a) | |
744 | 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 | |
745 | a:BreakJoints'' | |
746 | ghit:Play() | |
747 | elseif a:FindFirstChildOfClass'Humanoid' and not a:FindFirstChild'HumanoidRootPart' then | |
748 | a:BreakJoints'' | |
749 | end | |
750 | end | |
751 | ||
752 | if x == 1 then | |
753 | x = 0.1 | |
754 | end | |
755 | end | |
756 | end | |
757 | end) | |
758 | ||
759 | ------------------------------------------------------------------------ | |
760 | -- Animations -- | |
761 | ------------------------------------------------------------------------ | |
762 | ||
763 | while true do | |
764 | swait() | |
765 | ||
766 | if holding then | |
767 | gyro.Parent = nil | |
768 | elseif not holding then | |
769 | gyro.Parent = hammer | |
770 | gyro.Name = "hamma" | |
771 | end | |
772 | ||
773 | ypcall(function() | |
774 | if anim~=lastanim then | |
775 | runtime=0 | |
776 | end | |
777 | lastanim=anim | |
778 | hum.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0) | |
779 | syne=syne+.95 | |
780 | if not otheranims and not swimming then | |
781 | 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 | |
782 | anim="Idling" | |
783 | 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 | |
784 | anim="Walking" | |
785 | 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 | |
786 | anim="Sprinting" | |
787 | elseif torso.Velocity.y < -1 then | |
788 | anim='Falling' | |
789 | end | |
790 | end | |
791 | ||
792 | if anim=="Idling" and hum.WalkSpeed ~= 0 then | |
793 | idlesineinc=35 | |
794 | ||
795 | if not stopanim then | |
796 | 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) | |
797 | end | |
798 | ||
799 | if not stopanim2 then | |
800 | 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) | |
801 | end | |
802 | ||
803 | if not stopanim3 then | |
804 | 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) | |
805 | end | |
806 | ||
807 | 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) | |
808 | 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) | |
809 | 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) | |
810 | end | |
811 | ||
812 | if anim=="Walking" and hum.WalkSpeed ~= 0 then | |
813 | if not stopanim then | |
814 | 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) | |
815 | end | |
816 | ||
817 | if not stopanim2 then | |
818 | 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) | |
819 | end | |
820 | ||
821 | if not stopanim3 then | |
822 | 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) | |
823 | end | |
824 | ||
825 | 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) | |
826 | 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) | |
827 | 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) | |
828 | end | |
829 | ||
830 | if hum.WalkSpeed == 0 then | |
831 | if not stopanim then | |
832 | 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) | |
833 | end | |
834 | ||
835 | if not stopanim2 then | |
836 | 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) | |
837 | end | |
838 | ||
839 | if not stopanim3 then | |
840 | 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) | |
841 | end | |
842 | ||
843 | 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) | |
844 | 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) | |
845 | 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) | |
846 | end | |
847 | ||
848 | if 1 < rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air and hum.JumpPower ~= 0 then | |
849 | hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065) | |
850 | rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.1) | |
851 | larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.1) | |
852 | lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.1) | |
853 | rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.1) | |
854 | 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) | |
855 | elseif -1 > rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air then | |
856 | hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065) | |
857 | rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.06) | |
858 | larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.06) | |
859 | lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.06) | |
860 | rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.06) | |
861 | 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) | |
862 | end | |
863 | end) | |
864 | end |