SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end | |
6 | wait(1) | |
7 | v3 = Vector3.new | |
8 | cn = CFrame.new | |
9 | ca2 = CFrame.Angles | |
10 | mceil = math.ceil mc = mceil | |
11 | mran = math.random rn=mran | |
12 | mrad = math.rad rd=mrad | |
13 | mdeg = math.deg dg=mdeg | |
14 | mabs = math.abs abs=mabs | |
15 | ud = UDim2.new | |
16 | ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end | |
17 | mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end | |
18 | bn = BrickColor.new bc=bn | |
19 | c3 = Color3.new | |
20 | deb = game:GetService("Debris") | |
21 | ||
22 | Player = game.Players.LocalPlayer | |
23 | Char = Player.Character | |
24 | Torso = Char.Torso | |
25 | Head = Char.Head | |
26 | Humanoid = Char.Humanoid | |
27 | RootPart = Char.HumanoidRootPart | |
28 | Root = RootPart.RootJoint | |
29 | Mouse = Player:GetMouse() | |
30 | ||
31 | LA=Char["Left Arm"] | |
32 | RA=Char["Right Arm"] | |
33 | LL=Char["Left Leg"] | |
34 | RL=Char["Right Leg"] | |
35 | LAM=Torso["Left Shoulder"] | |
36 | RAM=Torso["Right Shoulder"] | |
37 | LLM=Torso["Left Hip"] | |
38 | RLM=Torso["Right Hip"] | |
39 | Neck=Torso.Neck | |
40 | Neck.C0=cn(0,1.5,0) | |
41 | Neck.C1=cn(0,0,0) | |
42 | ||
43 | name="Timbersaw" | |
44 | ||
45 | pcall(function() Char["Sawsuit"]:Destroy() end) | |
46 | pcall(function() Player.PlayerGui[name]:Destroy() end) | |
47 | pcall(function() Char[name]:Destroy() end) | |
48 | pcall(function() Char.Block:Destroy() end) | |
49 | pcall(function() Char.Animate:Destroy() end) | |
50 | ||
51 | ||
52 | script.Name = name | |
53 | ||
54 | as = {} | |
55 | so = {"Block","Hit","Shoot"} | |
56 | as.Cone = "1033714" | |
57 | as.Blast = "20329976" | |
58 | as.Diamond = "9756362" | |
59 | as.Block = "rbxasset://sounds\\metal.ogg" | |
60 | as.Wind = "rbxasset://168892363" | |
61 | as.Hit = "10209583" | |
62 | as.ElectricShock = "157325701" | |
63 | as.Shoot = "130849509" | |
64 | as.Chakram = "74322089" | |
65 | as.Ring = "3270017" | |
66 | ||
67 | ||
68 | iNew=function(tab) | |
69 | local v=Instance.new(tab[1]) | |
70 | for Ind,Val in pairs(tab) do | |
71 | if Ind~=1 and Ind~=2 then | |
72 | v[Ind] = Val | |
73 | end | |
74 | end | |
75 | v.Parent=tab[2]==0 and LastMade or tab[2] | |
76 | LastMade=v | |
77 | return v | |
78 | end | |
79 | ||
80 | iPart=function(tab) | |
81 | local v=Instance.new(tab.type or "Part") | |
82 | if tab.type~="CornerWedgePart" then v.formFactor="Custom" end | |
83 | v.TopSurface=10 v.BottomSurface=10 v.RightSurface=10 v.LeftSurface=10 v.FrontSurface=10 v.BackSurface=10 | |
84 | v.Size=v3(tab[2],tab[3],tab[4]) | |
85 | v.Locked = true | |
86 | v.Material="SmoothPlastic" | |
87 | if tab.co then v.BrickColor=bn(tab.co) end | |
88 | if tab.tr then v.Transparency=tab.tr end | |
89 | if tab.rf then v.Reflectance=tab.rf end | |
90 | if tab.cf then v.CFrame=tab.cf end | |
91 | if tab.an then v.Anchored=tab.an end | |
92 | if tab.mt then v.Material=tab.mt end | |
93 | if tab.ca then v.CanCollide=tab.ca end | |
94 | v.Parent=tab[1] | |
95 | LastMade=v | |
96 | return v | |
97 | end | |
98 | ||
99 | function Raycast(Pos,Dir,Dist,tab) | |
100 | return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *Dist),tab) | |
101 | end | |
102 | ||
103 | function wait2(tim) | |
104 | local last = tick() | |
105 | repeat wait(0) until (tick()-last)>=tim | |
106 | end | |
107 | ||
108 | Block=iNew{"NumberValue",Char,Name="Block",Value=0} | |
109 | ||
110 | Root.C0=cn(0,0,0) | |
111 | Root.C1=cn(0,0,0) | |
112 | ||
113 | for _,force in pairs(Torso:GetChildren()) do if force:IsA("BodyForce") or force:IsA("BodyGyro") or force:IsA("RocketPropulsion") then force:Destroy() end end | |
114 | ||
115 | pcall(function() Torso.LAW:Remove() Torso.RAW:Remove() Torso.LLW:Remove() Torso.RLW:Remove() end) | |
116 | LAW=iNew{"Weld",Torso,Name="LAW",Part0=Torso,C0=cn(-1.5,0.5,0),C1=cn(0,0.5,0)} | |
117 | RAW=iNew{"Weld",Torso,Name="RAW",Part0=Torso,C0=cn( 1.5,0.5,0),C1=cn(0,0.5,0)} | |
118 | LLW=iNew{"Weld",Torso,Name="LLW",Part0=Torso,C0=cn(-0.5, -1,0),C1=cn(0, 1,0)} | |
119 | RLW=iNew{"Weld",Torso,Name="RLW",Part0=Torso,C0=cn( 0.5, -1,0),C1=cn(0, 1,0)} | |
120 | ||
121 | function Arms(on) | |
122 | LAM.Parent=Torso LAM.Part0=Torso | |
123 | RAM.Parent=Torso RAM.Part0=Torso | |
124 | LAM.Part1=on and nil or LA | |
125 | RAM.Part1=on and nil or RA | |
126 | LAW.Part1=on and LA or nil | |
127 | RAW.Part1=on and RA or nil | |
128 | end | |
129 | ||
130 | function Legs(on) | |
131 | LLM.Parent=Torso LLM.Part0=Torso | |
132 | RLM.Parent=Torso RLM.Part0=Torso | |
133 | LLM.Part1=on and nil or LL | |
134 | RLM.Part1=on and nil or RL | |
135 | LLW.Part1=on and LL or nil | |
136 | RLW.Part1=on and RL or nil | |
137 | end | |
138 | ||
139 | function GetWeld(weld) | |
140 | if not weld:FindFirstChild("Angle") then | |
141 | local a = Instance.new("Vector3Value", weld) | |
142 | a.Name = "Angle" | |
143 | local x,y,z=weld.C0:toEulerAnglesXYZ() | |
144 | a.Value=v3(mdeg(x),mdeg(y),mdeg(z)) | |
145 | end | |
146 | return weld.C0.p,weld.Angle.Value | |
147 | end | |
148 | ||
149 | function ClearWeld(weld) | |
150 | if weld:FindFirstChild"Angle" then | |
151 | weld.Angle:Remove() | |
152 | end | |
153 | end | |
154 | ||
155 | function SetWeld(weld,CC,i, loops, origpos,origangle, nextpos,nextangle,smooth) | |
156 | local CO="C"..CC | |
157 | smooth = smooth or 1 | |
158 | if not weld:FindFirstChild("Angle") then | |
159 | local a = Instance.new("Vector3Value", weld) | |
160 | a.Name = "Angle" | |
161 | local x,y,z=weld.C0:toEulerAnglesXYZ() | |
162 | a.Value=v3(mdeg(x),mdeg(y),mdeg(z)) | |
163 | end | |
164 | ||
165 | local perc | |
166 | if smooth == 1 then | |
167 | perc = math.sin((math.pi/2)/loops*i) | |
168 | else | |
169 | perc = i/loops | |
170 | end | |
171 | ||
172 | local tox,toy,toz = 0,0,0 | |
173 | if origangle.x > nextangle.x then | |
174 | tox = -mabs(origangle.x - nextangle.x) *perc | |
175 | else | |
176 | tox = mabs(origangle.x - nextangle.x) *perc | |
177 | end | |
178 | if origangle.y > nextangle.y then | |
179 | toy = -mabs(origangle.y - nextangle.y) *perc | |
180 | else | |
181 | toy = mabs(origangle.y - nextangle.y) *perc | |
182 | end | |
183 | if origangle.z > nextangle.z then | |
184 | toz = -mabs(origangle.z - nextangle.z) *perc | |
185 | else | |
186 | toz = mabs(origangle.z - nextangle.z) *perc | |
187 | end | |
188 | ||
189 | local tox2,toy2,toz2 = 0,0,0 | |
190 | if origpos.x > nextpos.x then | |
191 | tox2 = -mabs(origpos.x - nextpos.x) *perc | |
192 | else | |
193 | tox2 = mabs(origpos.x - nextpos.x) *perc | |
194 | end | |
195 | if origpos.y > nextpos.y then | |
196 | toy2 = -mabs(origpos.y - nextpos.y) *perc | |
197 | else | |
198 | toy2 = mabs(origpos.y - nextpos.y) *perc | |
199 | end | |
200 | if origpos.z > nextpos.z then | |
201 | toz2 = -mabs(origpos.z - nextpos.z) *perc | |
202 | else | |
203 | toz2 = mabs(origpos.z - nextpos.z) *perc | |
204 | end | |
205 | weld.Angle.Value = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz) | |
206 | weld[CO] = cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz) | |
207 | end | |
208 | ||
209 | function Triangle(p) | |
210 | local g, v = 0 | |
211 | for s = 1, 3 do | |
212 | local l = (p[1+(s+1)%3] - p[1+s%3]).magnitude | |
213 | g, v = l > g and l or g, l > g and {p[1+(s-1)%3], p[1+(s)%3], p[1+(s+1)%3]} or v | |
214 | end | |
215 | local d = v[2]+(v[3]-v[2]).unit*((v[3]-v[2]).unit:Dot(v[1]-v[2])) | |
216 | local c, b = (d-v[1]).unit, (v[2]-v[3]).unit | |
217 | local a = b:Cross(c) | |
218 | local w0=iPart{workspace,1,1,1,an=true,tr=0.5,mt="SmoothPlastic",co=cc[2],cf=cn(0,0,0,a.x,b.x,c.x,a.y,b.y,c.y,a.z,b.z,c.z) + (v[1]+v[2])/2} w0.CanCollide = false w0.Name = "unray" | |
219 | local w1=iPart{workspace,1,1,1,an=true,tr=0.5,mt="SmoothPlastic",co=cc[2],cf=cn(0,0,0,-a.x,-b.x,c.x,-a.y,-b.y,c.y,-a.z,-b.z,c.z) + (v[1]+v[3])/2} w1.CanCollide = false w1.Name = "unray" | |
220 | local m0=iNew{"SpecialMesh",w0,MeshType="Wedge",Scale=v3(0,(v[2]-d).magnitude,(v[1]-d).magnitude)} | |
221 | local m1=iNew{"SpecialMesh",w1,MeshType="Wedge",Scale=v3(0,(v[3]-d).magnitude,(v[1]-d).magnitude)} | |
222 | return w0,w1 | |
223 | end | |
224 | ||
225 | function Lightning(from,to,times,offset,col,thickness,tra) | |
226 | local magz = (from - to).magnitude | |
227 | local curpos = from | |
228 | local trz = {-offset,offset} | |
229 | for i=1,times do | |
230 | local li = iPart{workspace,thickness,thickness,magz/times,an=true,tr=tra or 0.4,co=col or "New Yeller"} li.CanCollide = false li.Name = "unray" | |
231 | local ofz = v3(trz[mran(1,2)],trz[mran(1,2)],trz[mran(1,2)]) | |
232 | local trolpos = cn(curpos,to)*cn(0,0,magz/times).p+ofz | |
233 | if times == i then | |
234 | local magz2 = (curpos - to).magnitude | |
235 | li.Size = v3(thickness,thickness,magz2) | |
236 | li.CFrame = cn(curpos,to)*cn(0,0,-magz2/2) | |
237 | else | |
238 | li.CFrame = cn(curpos,trolpos)*cn(0,0,magz/times/2) | |
239 | end | |
240 | curpos = li.CFrame*cn(0,0,magz/times/2).p | |
241 | deb:AddItem(li,0.25) | |
242 | end | |
243 | end | |
244 | ||
245 | function PlaySound(sound,pitch,volume,parent) | |
246 | local newSound = iNew{"Sound",parent or Torso,Pitch=pitch,Volume=volume,Name=sound,SoundId=sound} | |
247 | newSound:Play() | |
248 | deb:AddItem(newSound,6) | |
249 | return newSound | |
250 | end | |
251 | ||
252 | function MeshEffect(par,cf,x,y,z,inc,col,sha,adj) | |
253 | local adj = adj or cn(0,0,0) | |
254 | local mp=iPart{par,1,1,1,co=col,tr=0.3,ca=false,an=true} mp.CFrame=cf mp.Name="unray" | |
255 | local ms | |
256 | if sha:sub(1,4)=="http" then | |
257 | ms=iNew{"SpecialMesh",mp,MeshId=sha} | |
258 | elseif sha=="Block" then | |
259 | ms=iNew{"BlockMesh",mp} | |
260 | elseif sha=="Cylinder" then | |
261 | ms=iNew{"CylinderMesh",mp} | |
262 | elseif sha=="Head" or sha=="Sphere" then | |
263 | ms=iNew{"SpecialMesh",mp,MeshType=sha} | |
264 | end | |
265 | deb:AddItem(mp,0.7) | |
266 | Spawn(function() | |
267 | for i=0,1,inc do | |
268 | mp.Transparency=0.3+(1*i) | |
269 | mp.CFrame=mp.CFrame*adj | |
270 | ms.Scale=v3(x,y,z)*(0.3+(1*i)) | |
271 | if i>=1 or mp.Transparency >= 1 then mp:Destroy() end | |
272 | wait(0) | |
273 | end | |
274 | end) | |
275 | end | |
276 | ||
277 | Dmg=true | |
278 | Dmgv={10,15} | |
279 | HitDebounce={} | |
280 | Mult = 1 | |
281 | Damage=function(Hum,Damage) | |
282 | local HName = Hum.Parent.Name | |
283 | if HitDebounce[HName] and HitDebounce[HName]>tick() then return end | |
284 | HitDebounce[HName] = tick()+0.6 | |
285 | local Dealt = Damage*Mult | |
286 | local col = "" | |
287 | ||
288 | if Hum.Parent:findFirstChild("Block") and Hum.Parent.Block:IsA("NumberValue") and Hum.Parent.Block.Value>0 then | |
289 | Hum.Parent.Block.Value=Hum.Parent.Block.Value-1 | |
290 | col="Bright blue" | |
291 | PlaySound(as.Block,1,1,Torso) | |
292 | else | |
293 | Hum:TakeDamage(Dealt) | |
294 | col="Bright red" | |
295 | PlaySound(as.Hit,1,1,Torso) | |
296 | end | |
297 | Knockback(Hum.Parent.Torso,Torso.Position,20,0.2) | |
298 | local DoH=iNew{'Model',workspace,Name=col=='Bright blue' and 'Block' or Dealt} | |
299 | iNew{'Humanoid',DoH,MaxHealth=0,Health=0,Name=''} | |
300 | local Doh=iPart{DoH,1,0.2,1,co=col,an=true} Doh.Name='Head' Doh.CanCollide = false | |
301 | iNew{'BlockMesh',Doh} | |
302 | local dofs=Hum.Parent.Torso.CFrame*cn(mran2(-1.5,1.5),2.5,mran2(-1,1)) | |
303 | Doh.CFrame=dofs | |
304 | deb:AddItem(Doh,1) | |
305 | end | |
306 | ||
307 | local Suit = iNew{"Model",Char,Name="Sawsuit"} | |
308 | cc = {"Black","Dark stone grey","Brown","Olive","Bright red","Bright orange","Bright yellow","Medium stone grey","Bright green","Bright blue","White","Bright purple", | |
309 | "Really black"} | |
310 | ButtonColors = {cc[5],cc[7],cc[9],cc[10],cc[12]} | |
311 | Stand = iPart{Suit,2,2,1,tr=1} | |
312 | wStand = iNew{"Weld",Suit,Part0=RootPart,Part1=Stand,C0=cn(0,0,0),C1=cn(0,0.5,0.5)} | |
313 | ||
314 | for i=360/12,360,360/12 do | |
315 | local Wood = iPart{Suit,1.5,1,0.5,mt="WoodPlanks",co=cc[3]} | |
316 | iNew{"Weld",Suit,Part0=Stand,Part1=Wood,C0=cn(0,0,0)*ca(0,i,0)*cn(0,0,-2.5)} | |
317 | local Int = iPart{Suit,1.25,0.2,1,co=cc[2]} | |
318 | iNew{"Weld",Suit,Part0=Wood,Part1=Int,C0=cn(0,0.5,0.75)} | |
319 | local Metal = iPart{Suit,1.5,0.4,0.7,mt="DiamondPlate",co=cc[2]} | |
320 | iNew{"Weld",Suit,Part0=Wood,Part1=Metal,C0=cn(0,1.4/2,0)} | |
321 | local Wood2 = iPart{Suit,1.5,0.75,0.5,mt="WoodPlanks",co=cc[3]} | |
322 | iNew{"Weld",Suit,Part0=Wood,Part1=Wood2,C0=cn(0,-1.75/4,-0.25)*ca(-25,0,0)*cn(0,-1.75/4,0.25)} | |
323 | end | |
324 | ||
325 | SmokeStack = iPart{Suit,0.4,2,0.4,co=cc[2]} | |
326 | iNew{"Weld",Suit,Part0=Stand,Part1=SmokeStack,C0=cn(1.75,1.5,1.25)} | |
327 | iNew{"CylinderMesh",SmokeStack} | |
328 | StackBall = iPart{Suit,0.8,0.8,0.8,co=cc[2]} | |
329 | iNew{"Weld",Suit,Part0=SmokeStack,Part1=StackBall,C0=cn(0,1,0)} | |
330 | iNew{"SpecialMesh",StackBall,MeshType="Sphere"} | |
331 | StackC = iPart{Suit,1,0.2,1,co=cc[5]} | |
332 | iNew{"Weld",Suit,Part0=SmokeStack,Part1=StackC,C0=cn(0,1,0)} | |
333 | iNew{"CylinderMesh",StackC} | |
334 | Cone = iPart{Suit,0,0,0,co=cc[5]} | |
335 | iNew{"Weld",Suit,Part0=StackC,Part1=Cone,C0=cn(0,0.5,0)} | |
336 | iNew{"SpecialMesh",Cone,MeshId=as.Cone,Scale=v3(0.4,1.1,0.4)} | |
337 | StackC2 = iPart{Suit,0.55,0.2,0.55,co=cc[6]} | |
338 | iNew{"Weld",Suit,Part0=StackC,Part1=StackC2,C0=cn(0,0.5,0)} | |
339 | iNew{"CylinderMesh",StackC2,Scale=v3(1,0.5,1)} | |
340 | Cone2 = iPart{Suit,0,0,0,co=cc[5]} | |
341 | iNew{"Weld",Suit,Part0=Cone,Part1=Cone2,C0=cn(0,0,0)*ca(180,0,0)} | |
342 | iNew{"SpecialMesh",Cone2,MeshId=as.Cone,Scale=v3(0.4,1.3,0.4)} | |
343 | Hole = iPart{Suit,0.6,0.2,0.6,co=cc[2]} | |
344 | iNew{"Weld",Suit,Part0=Cone2,Part1=Hole,C0=cn(0,-0.5,0)} | |
345 | iNew{"CylinderMesh",Hole,Scale=v3(1,0.1,1)} | |
346 | StackTop = iPart{Suit,0.8,0.2,0.8,co=cc[5]} | |
347 | iNew{"Weld",Suit,Part0=Hole,Part1=StackTop,C0=cn(-0.4,-0,0)*ca(0,0,-30)*cn(0.4,0,0)} | |
348 | iNew{"CylinderMesh",StackTop,Scale=v3(1,0.5,1)} | |
349 | iNew{"Smoke",Hole,Color=bn(cc[13]).Color,RiseVelocity=-10,Size=1,Opacity = 0.4} | |
350 | ||
351 | BackCyl = iPart{Suit,0,0,0,co=cc[2],mt="DiamondPlate"} | |
352 | iNew{"Weld",Suit,Part0=Stand,Part1=BackCyl,C0=cn(0,0.5,2)} | |
353 | iNew{"SpecialMesh",BackCyl,MeshType="Sphere",Scale=v3(3,4.5,1.25)/0.2} | |
354 | SeatBack = iPart{Suit,2.25,3,0.3,co=cc[1]} | |
355 | iNew{"Weld",Suit,Part0=Stand,Part1=SeatBack,C0=cn(0,0.5,1.2)*ca(5,0,0)} | |
356 | SeatBack2 = iPart{Suit,2.25*0.9,3*0.9,0.2,mt="Fabric",co=cc[6]} | |
357 | iNew{"Weld",Suit,Part0=SeatBack,Part1=SeatBack2,C0=cn(0,0,-0.25)} | |
358 | for i=-1,1,2 do | |
359 | SeatS = iPart{Suit,0.2,1.5,2,co=cc[1]} | |
360 | iNew{"Weld",Suit,Part0=SeatBack,Part1=SeatS,C0=cn((2.05/2)*i,0,0.1)*ca(0,-15*i,0)*cn(0,0,-1)} | |
361 | SeatS2 = iPart{Suit,0.2,1.5*0.9,2*0.9,mt="Fabric",co=cc[6]} | |
362 | iNew{"Weld",Suit,Part0=SeatS,Part1=SeatS2,C0=cn(-0.1*i,0,0)} | |
363 | end | |
364 | ||
365 | Levers = {} | |
366 | for i=-1,1,2 do | |
367 | local LevJ = iPart{Suit,0,0,0,tr=0.5} | |
368 | local LeverW = iNew{"Weld",Suit,Part0=Stand,Part1=LevJ,C0=cn(i,0.6,-1.5)} | |
369 | local Lever = iPart{Suit,0.2,1,0.2,co=cc[8]} | |
370 | iNew{"Weld",Suit,Part0=LevJ,Part1=Lever,C0=cn(0,0.5,0)} | |
371 | table.insert(Levers,{LeverW}) | |
372 | iNew{"CylinderMesh",Lever} | |
373 | local LeverBall = iPart{Suit,0.5,0.5,0.5,co=cc[6]} | |
374 | iNew{"Weld",Suit,Part0=Lever,Part1=LeverBall,C0=cn(0,0.6,0)} | |
375 | iNew{"SpecialMesh",LeverBall,MeshType="Sphere"} | |
376 | end | |
377 | ||
378 | for i=-1,1,1 do | |
379 | local Button = iPart{Suit,0.3,0.2,0.3,co=ButtonColors[mran(1,#ButtonColors)]} | |
380 | iNew{"Weld",Suit,Part0=Stand,Part1=Button,C0=cn(0.5*i,0.6,-1.5)} | |
381 | iNew{"CylinderMesh",Button,Scale=v3(1,0.5,1)} | |
382 | end | |
383 | ||
384 | Chakram = iPart{Suit,5,5,1,co=cc[2]} Chakram.Name="Chakram" | |
385 | wChakram = iNew{"Weld",Suit,Part0=Stand,Part1=Chakram,C0=cn(0,-1.4,0)*ca(90,0,0)} | |
386 | iNew{"SpecialMesh",Chakram,MeshId=as.Chakram,Scale=v3(5.5,5.5,5)} | |
387 | for i=-1,1,2 do | |
388 | Cyl = iPart{Suit,6,0.2,6,co=cc[2]} | |
389 | iNew{"Weld",Suit,Part0=Stand,Part1=Cyl,C0=cn(0,-1.4+i/5,0)} | |
390 | iNew{"CylinderMesh",Cyl} | |
391 | end | |
392 | for i=360/8,360,360/8 do | |
393 | local Bolt = iPart{Suit,0.2,0.2,0.2,co=cc[4],mt="DiamondPlate"} | |
394 | iNew{"Weld",Suit,Part0=Cyl,Part1=Bolt,C0=cn(0,0.1,0)*ca(0,i,0)*cn(0,0,-2.75)} | |
395 | iNew{"SpecialMesh",Bolt,MeshType="Sphere",Scale=v3(1,0.75,1)} | |
396 | end | |
397 | ||
398 | Ball = iPart{Suit,4.5,3.5,4,co=cc[1]} | |
399 | wBall = iNew{"Weld",Suit,Part0=Stand,Part1=Ball,C0=cn(0,-1.5,0)} | |
400 | iNew{"SpecialMesh",Ball,MeshType="Sphere"} | |
401 | BallM = iPart{Suit,2,3.5*1.1,4*1.1,co=cc[2]} | |
402 | iNew{"Weld",Suit,Part0=Ball,Part1=BallM,C0=cn(0,0,0)} | |
403 | iNew{"SpecialMesh",BallM,MeshType="Sphere"} | |
404 | LArmConnect = iPart{Suit,0.25,1.25,0.5,co=cc[2],mt="DiamondPlate"} | |
405 | iNew{"Weld",Suit,Part0=Stand,Part1=LArmConnect,C0=cn(-2.275,1.525,0)} | |
406 | ConnectTop = iPart{Suit,0.5,0.2475,0.5,co=cc[2],mt="DiamondPlate"} | |
407 | iNew{"Weld",Suit,Part0=LArmConnect,Part1=ConnectTop,C0=cn(0,1.25/2,0)*ca(0,0,90)} | |
408 | iNew{"CylinderMesh",ConnectTop} | |
409 | CCyl = iPart{Suit,2,0.25,2,co=cc[4],mt="DiamondPlate"} | |
410 | iNew{"Weld",Suit,Part0=LArmConnect,Part1=CCyl,C0=cn(-0.25,-0.125,0)*ca(0,0,90)} | |
411 | iNew{"CylinderMesh",CCyl} | |
412 | CCyl2 = iPart{Suit,2.5,0.35,2.5,co=cc[5],mt="DiamondPlate"} | |
413 | iNew{"Weld",Suit,Part0=CCyl,Part1=CCyl2,C0=cn(0,0.3,0)} | |
414 | iNew{"CylinderMesh",CCyl2} | |
415 | CCyl3 = iPart{Suit,2,0.25,2,co=cc[2],mt="DiamondPlate"} | |
416 | iNew{"Weld",Suit,Part0=CCyl2,Part1=CCyl3,C0=cn(0,0.25,0)} | |
417 | iNew{"CylinderMesh",CCyl3} | |
418 | CCyl4 = iPart{Suit,1.5,0.25,1.5,co=cc[5],mt="DiamondPlate"} | |
419 | iNew{"Weld",Suit,Part0=CCyl3,Part1=CCyl4,C0=cn(0,0.25,0)} | |
420 | iNew{"CylinderMesh",CCyl4} | |
421 | ||
422 | LArm = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} | |
423 | wLArm = iNew{"Weld",Suit,Part0=CCyl4,Part1=LArm,C0=ca(-35,0,45)} | |
424 | iNew{"SpecialMesh",LArm,MeshType="Sphere"} | |
425 | ArmE = iPart{Suit,0.5,1.5,0.5,co=cc[2]} | |
426 | iNew{"Weld",Suit,Part0=LArm,Part1=ArmE,C0=cn(0,1.25,0)} | |
427 | iNew{"CylinderMesh",ArmE} | |
428 | LArm2 = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} | |
429 | wLArm2 = iNew{"Weld",Suit,Part0=ArmE,Part1=LArm2,C0=cn(0,0.75,0)*ca(-80,100,0)} | |
430 | iNew{"SpecialMesh",LArm2,MeshType="Sphere"} | |
431 | ArmF = iPart{Suit,1.35,0.25,1.35,co=cc[5],mt="DiamondPlate"} | |
432 | iNew{"Weld",Suit,Part0=LArm2,Part1=ArmF} | |
433 | iNew{"CylinderMesh",ArmF} | |
434 | ArmFM = iPart{Suit,1.25,1,1.25,co=cc[3],mt="WoodPlanks"} | |
435 | iNew{"Weld",Suit,Part0=ArmF,Part1=ArmFM,C0=cn(0,0.5,0)} | |
436 | iNew{"CylinderMesh",ArmFM} | |
437 | ArmF = iPart{Suit,1.35,0.25,1.35,co=cc[5],mt="DiamondPlate"} | |
438 | iNew{"Weld",Suit,Part0=ArmFM,Part1=ArmF,C0=cn(0,0.5,0)} | |
439 | iNew{"CylinderMesh",ArmF} | |
440 | ArmAnt = iPart{Suit,0.4,0.75,0.4,co=cc[5],mt="DiamondPlate"} | |
441 | iNew{"Weld",Suit,Part0=ArmFM,Part1=ArmAnt,C0=cn(-0.775,-0.25,0)} | |
442 | iNew{"CylinderMesh",ArmAnt} | |
443 | ArmAnt2 = iPart{Suit,0.2,0.75,0.2,co=cc[8]} | |
444 | iNew{"Weld",Suit,Part0=ArmAnt,Part1=ArmAnt2,C0=cn(0,-0.75,0)} | |
445 | iNew{"CylinderMesh",ArmAnt2} | |
446 | ArmAnt3 = iPart{Suit,0.35,0.2,0.35,co=cc[2]} | |
447 | iNew{"Weld",Suit,Part0=ArmAnt,Part1=ArmAnt3,C0=cn(0,0.75/2,0)} | |
448 | iNew{"CylinderMesh",ArmAnt3,Scale=v3(1,0.1,1)} | |
449 | ArmAnt4 = iPart{Suit,0.3,0.3,0.3,co=cc[5]} | |
450 | iNew{"Weld",Suit,Part0=ArmAnt2,Part1=ArmAnt4,C0=cn(0,-0.75/2,0)} | |
451 | iNew{"CylinderMesh",ArmAnt4} | |
452 | for i=-1,1,2 do | |
453 | local BladeH = iPart{Suit,0.5,1.25,0.2,co=cc[2],mt="DiamondPlate"} | |
454 | iNew{"Weld",Suit,Part0=ArmF,Part1=BladeH,C0=cn(0,0.75,i/5)} | |
455 | local BladeH2 = iPart{Suit,0.5,0.2,0.5,co=cc[2],mt="DiamondPlate"} | |
456 | iNew{"Weld",Suit,Part0=BladeH,Part1=BladeH2,C0=cn(0,1.25/2,0)*ca(90,0,0)} | |
457 | iNew{"CylinderMesh",BladeH2,Scale=v3(1,0.99,1)} | |
458 | local Bolt = iPart{Suit,0.2,0.2,0.2,co=cc[8]} | |
459 | iNew{"Weld",Suit,Part0=BladeH2,Part1=Bolt,C0=cn(0,(0.25/2)*i,0)} | |
460 | iNew{"CylinderMesh",Bolt,Scale=v3(1,0.25,1)} | |
461 | local Bolt = iPart{Suit,0.2,0.2,0.2,co=cc[8]} | |
462 | iNew{"Weld",Suit,Part0=BladeH,Part1=Bolt,C0=cn(0,0,(0.25/2)*i)*ca(90,0,0)} | |
463 | iNew{"CylinderMesh",Bolt,Scale=v3(1,0.25,1)} | |
464 | end | |
465 | ArmSawP = iPart{Suit,0.8,2,0.2,co=cc[8]} | |
466 | iNew{"Weld",Suit,Part0=ArmF,Part1=ArmSawP,C0=cn(0,2.25,0)} | |
467 | for i=-1,1,2 do | |
468 | local ArmSawC = iPart{Suit,0.8,0.2,0.8,co=cc[8]} | |
469 | iNew{"Weld",Suit,Part0=ArmSawP,Part1=ArmSawC,C0=cn(0,1*i,0)*ca(90,0,0)} | |
470 | iNew{"CylinderMesh",ArmSawC,Scale=v3(1,0.99,1)} | |
471 | end | |
472 | for i=-1,1,1 do | |
473 | local ArmSawC = iPart{Suit,0.3,0.2,0.3,co=cc[8],mt="DiamondPlate"} | |
474 | iNew{"Weld",Suit,Part0=ArmSawP,Part1=ArmSawC,C0=cn(0,0.9*i,0.25/2)*ca(90,0,0)} | |
475 | iNew{"CylinderMesh",ArmSawC,Scale=v3(1,0.25,1)} | |
476 | end | |
477 | Saw0 = iPart{Suit,0,0,0,tr=1} | |
478 | iNew{"Weld",Suit,Part0=ArmSawP,Part1=Saw0,C0=ca(90,90,0)} | |
479 | ||
480 | Saws = {} | |
481 | for i=1,28 do | |
482 | local Saw = iPart{Suit,0.55,0.2,i%2==0 and 0.55 or 0.8,co=cc[2]} Saw.Name="Saw" | |
483 | local wSaw = iNew{"Weld",Suit,Part0=Saw0,Part1=Saw} | |
484 | iNew{"BlockMesh",Saw,Scale=v3(1,0.5,1)} | |
485 | table.insert(Saws,{Saw,wSaw}) | |
486 | end | |
487 | ||
488 | RArmConnect = iPart{Suit,0.25,1.25,0.5,co=cc[2],mt="DiamondPlate"} | |
489 | iNew{"Weld",Suit,Part0=Stand,Part1=RArmConnect,C0=cn(2.275,1.525,0)} | |
490 | ConnectTop = iPart{Suit,0.5,0.2475,0.5,co=cc[2],mt="DiamondPlate"} | |
491 | iNew{"Weld",Suit,Part0=RArmConnect,Part1=ConnectTop,C0=cn(0,1.25/2,0)*ca(0,0,90)} | |
492 | iNew{"CylinderMesh",ConnectTop} | |
493 | CCyl = iPart{Suit,2,0.25,2,co=cc[4],mt="DiamondPlate"} | |
494 | iNew{"Weld",Suit,Part0=RArmConnect,Part1=CCyl,C0=cn(0.25,-0.125,0)*ca(0,0,-90)} | |
495 | iNew{"CylinderMesh",CCyl} | |
496 | CCyl2 = iPart{Suit,2.5,0.35,2.5,co=cc[5],mt="DiamondPlate"} | |
497 | iNew{"Weld",Suit,Part0=CCyl,Part1=CCyl2,C0=cn(0,0.3,0)} | |
498 | iNew{"CylinderMesh",CCyl2} | |
499 | CCyl3 = iPart{Suit,2,0.25,2,co=cc[2],mt="DiamondPlate"} | |
500 | iNew{"Weld",Suit,Part0=CCyl2,Part1=CCyl3,C0=cn(0,0.25,0)} | |
501 | iNew{"CylinderMesh",CCyl3} | |
502 | CCyl4 = iPart{Suit,1.5,0.25,1.5,co=cc[5],mt="DiamondPlate"} | |
503 | iNew{"Weld",Suit,Part0=CCyl3,Part1=CCyl4,C0=cn(0,0.25,0)} | |
504 | iNew{"CylinderMesh",CCyl4} | |
505 | ||
506 | RArm = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} | |
507 | wRArm = iNew{"Weld",Suit,Part0=CCyl4,Part1=RArm,C0=ca(0,-35,-50)} | |
508 | iNew{"SpecialMesh",RArm,MeshType="Sphere"} | |
509 | ArmE = iPart{Suit,0.5,1.5,0.5,co=cc[2]} | |
510 | iNew{"Weld",Suit,Part0=RArm,Part1=ArmE,C0=cn(0,1.25,0)} | |
511 | iNew{"CylinderMesh",ArmE} | |
512 | RArm2 = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} | |
513 | wRArm2 = iNew{"Weld",Suit,Part0=ArmE,Part1=RArm2,C0=cn(0,0.75,0)*ca(0,90,-65)} | |
514 | iNew{"SpecialMesh",RArm2,MeshType="Sphere"} | |
515 | ArmF = iPart{Suit,1.35,0.25,1.35,co=cc[5],mt="DiamondPlate"} | |
516 | iNew{"Weld",Suit,Part0=RArm2,Part1=ArmF} | |
517 | iNew{"CylinderMesh",ArmF} | |
518 | ArmFM = iPart{Suit,1.25,1,1.25,co=cc[3],mt="WoodPlanks"} | |
519 | iNew{"Weld",Suit,Part0=ArmF,Part1=ArmFM,C0=cn(0,0.5,0)} | |
520 | iNew{"CylinderMesh",ArmFM} | |
521 | ArmF = iPart{Suit,1.35,0.25,1.35,co=cc[5],mt="DiamondPlate"} | |
522 | iNew{"Weld",Suit,Part0=ArmFM,Part1=ArmF,C0=cn(0,0.5,0)} | |
523 | iNew{"CylinderMesh",ArmF} | |
524 | ArmAnt = iPart{Suit,0.4,0.75,0.4,co=cc[5],mt="DiamondPlate"} | |
525 | iNew{"Weld",Suit,Part0=ArmFM,Part1=ArmAnt,C0=cn(-0.775,-0.25,0)} | |
526 | iNew{"CylinderMesh",ArmAnt} | |
527 | ArmAnt2 = iPart{Suit,0.2,0.75,0.2,co=cc[8]} | |
528 | iNew{"Weld",Suit,Part0=ArmAnt,Part1=ArmAnt2,C0=cn(0,-0.75,0)} | |
529 | iNew{"CylinderMesh",ArmAnt2} | |
530 | ArmAnt3 = iPart{Suit,0.35,0.2,0.35,co=cc[2]} | |
531 | iNew{"Weld",Suit,Part0=ArmAnt,Part1=ArmAnt3,C0=cn(0,0.75/2,0)} | |
532 | iNew{"CylinderMesh",ArmAnt3,Scale=v3(1,0.1,1)} | |
533 | ArmAnt4 = iPart{Suit,0.3,0.3,0.3,co=cc[5]} | |
534 | iNew{"Weld",Suit,Part0=ArmAnt2,Part1=ArmAnt4,C0=cn(0,-0.75/2,0)} | |
535 | iNew{"CylinderMesh",ArmAnt4} | |
536 | ||
537 | for i=360/12,360,360/12 do | |
538 | local ArmP = iPart{Suit,0.45,0.8,0.2,co=cc[8]} ArmP.Name = "Saw" | |
539 | iNew{"Weld",Suit,Part0=ArmF,Part1=ArmP,C0=cn(0,0.4,0)*ca(0,i,0)*cn(0,0,0.6)*ca(20,0,0)} | |
540 | end | |
541 | for i=360/3,360,360/3 do | |
542 | local HookP = iPart{Suit,0.5,0.5,0.2,co=cc[8]} HookP.Name = "Saw" | |
543 | iNew{"Weld",Suit,Part0=ArmF,Part1=HookP,C0=cn(0,0.9,0)*ca(0,i,0)*cn(0,0,0.85)*ca(40,0,0)} | |
544 | local HookP2 = iPart{Suit,0.5,0.7,0.2,co=cc[8]} HookP2.Name = "Saw" | |
545 | iNew{"Weld",Suit,Part0=HookP,Part1=HookP2,C0=cn(0,0.25,0.1)*ca(-75,0,0)*cn(0,0.35,-0.1)} | |
546 | end | |
547 | Hole = iPart{Suit,1.1,0.2,1.1,co=cc[13]} | |
548 | iNew{"Weld",Suit,Part0=ArmF,Part1=Hole,C0=cn(0,0.125,0)} | |
549 | iNew{"CylinderMesh",Hole,Scale=v3(1,0.1,1)} | |
550 | LLeg = iPart{Suit,1.5,1.5,1.5,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
551 | wLLeg = iNew{"Weld",Suit,Part0=Ball,Part1=LLeg,C0=cn(-1.5,-1.25,-0.25)*ca(25,0,20)} | |
552 | iNew{"SpecialMesh",LLeg,MeshType="Sphere"} | |
553 | LegE = iPart{Suit,0.75,1.5,0.75,co=cc[2]} LastMade.CanCollide = false | |
554 | iNew{"Weld",Suit,Part0=LLeg,Part1=LegE,C0=cn(0,-1.25,0)} | |
555 | iNew{"CylinderMesh",LegE} | |
556 | LLeg2 = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
557 | wLLeg2 = iNew{"Weld",Suit,Part0=LegE,Part1=LLeg2,C0=cn(0,-0.75,0)*ca(-45,0,0)} | |
558 | iNew{"SpecialMesh",LLeg2,MeshType="Sphere"} | |
559 | LegE = iPart{Suit,0.75,1,0.75,co=cc[2]} LastMade.CanCollide = false | |
560 | iNew{"Weld",Suit,Part0=LLeg2,Part1=LegE,C0=cn(0,-1,0)} | |
561 | iNew{"CylinderMesh",LegE} | |
562 | LLeg3 = iPart{Suit,1,1,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
563 | wLLeg3 = iNew{"Weld",Suit,Part0=LegE,Part1=LLeg3,C0=cn(0,-0.5,0)*ca(0,0,0)} | |
564 | iNew{"SpecialMesh",LLeg3,MeshType="Sphere"} | |
565 | ||
566 | LFoot = iPart{Suit,1.5,0.5,2.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
567 | iNew{"Weld",Suit,Part0=LLeg3,Part1=LFoot,C0=cn(0,-0.5,-0.5)*ca(0,0,0)} | |
568 | FootT = iPart{Suit,1,0.25,1.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
569 | iNew{"Weld",Suit,Part0=LFoot,Part1=FootT,C0=cn(0,0.75/2,0.5)} | |
570 | FootT2 = iPart{Suit,1,0.25,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
571 | iNew{"Weld",Suit,Part0=FootT,Part1=FootT2,C0=cn(0,0,-2.25/2+0.5)} | |
572 | iNew{"CylinderMesh",FootT2} | |
573 | for i=-1,1,2 do | |
574 | local FootWedge = iPart{Suit,1.5/4,0.5,0.75,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
575 | iNew{"Weld",Suit,Part0=LFoot,Part1=FootWedge,C0=cn((0.75-(1.5/4/2))*i,0,-2.25/2-0.75/2)} | |
576 | iNew{"SpecialMesh",FootWedge,MeshType="Wedge"} | |
577 | local FootPart = iPart{Suit,1.5/4,0.5,0.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
578 | iNew{"Weld",Suit,Part0=LFoot,Part1=FootPart,C0=cn((0.75-(1.5/4)*1.5)*i,0,-2.25/2-0.25/2)} | |
579 | local FootPart = iPart{Suit,1.5/4,0.5,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
580 | iNew{"Weld",Suit,Part0=LFoot,Part1=FootPart,C0=cn((0.75-(1.5/4)*1.5)*i,0,-2.5/2-1/2-0.125)} | |
581 | iNew{"SpecialMesh",FootPart,MeshType="Wedge"} | |
582 | end | |
583 | for i=-1,1,1 do | |
584 | local Bolt = iPart{Suit,0.3,0.2,0.3,co=cc[2],mt="DiamondPlate"} LastMade.CanCollide = false | |
585 | iNew{"Weld",Suit,Part0=FootT2,Part1=Bolt,C0=cn(0.5*i,-0.1,i==0 and -0.9 or -0.75)} | |
586 | iNew{"CylinderMesh",Bolt,Scale=v3(1,0.5,1)} | |
587 | end | |
588 | ||
589 | RLeg = iPart{Suit,1.5,1.5,1.5,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
590 | wRLeg = iNew{"Weld",Suit,Part0=Ball,Part1=RLeg,C0=cn(1.5,-1.25,-0.25)*ca(25,0,-20)} | |
591 | iNew{"SpecialMesh",RLeg,MeshType="Sphere"} | |
592 | LegE = iPart{Suit,0.75,1.5,0.75,co=cc[2]} LastMade.CanCollide = false | |
593 | iNew{"Weld",Suit,Part0=RLeg,Part1=LegE,C0=cn(0,-1.25,0)} | |
594 | iNew{"CylinderMesh",LegE} | |
595 | RLeg2 = iPart{Suit,1.25,1.25,1.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
596 | wRLeg2 = iNew{"Weld",Suit,Part0=LegE,Part1=RLeg2,C0=cn(0,-0.75,0)*ca(-45,0,0)} | |
597 | iNew{"SpecialMesh",RLeg2,MeshType="Sphere"} | |
598 | LegE = iPart{Suit,0.75,1,0.75,co=cc[2]} LastMade.CanCollide = false | |
599 | iNew{"Weld",Suit,Part0=RLeg2,Part1=LegE,C0=cn(0,-1,0)} | |
600 | iNew{"CylinderMesh",LegE} | |
601 | RLeg3 = iPart{Suit,1,1,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
602 | wRLeg3 = iNew{"Weld",Suit,Part0=LegE,Part1=RLeg3,C0=cn(0,-0.5,0)*ca(0,0,0)} | |
603 | iNew{"SpecialMesh",RLeg3,MeshType="Sphere"} | |
604 | ||
605 | RFoot = iPart{Suit,1.5,0.5,2.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
606 | iNew{"Weld",Suit,Part0=RLeg3,Part1=RFoot,C0=cn(0,-0.5,-0.5)*ca(0,0,0)} | |
607 | FootT = iPart{Suit,1,0.25,1.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
608 | iNew{"Weld",Suit,Part0=RFoot,Part1=FootT,C0=cn(0,0.75/2,0.5)} | |
609 | FootT2 = iPart{Suit,1,0.25,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
610 | iNew{"Weld",Suit,Part0=FootT,Part1=FootT2,C0=cn(0,0,-2.25/2+0.5)} | |
611 | iNew{"CylinderMesh",FootT2} | |
612 | for i=-1,1,2 do | |
613 | local FootWedge = iPart{Suit,1.5/4,0.5,0.75,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
614 | iNew{"Weld",Suit,Part0=RFoot,Part1=FootWedge,C0=cn((0.75-(1.5/4/2))*i,0,-2.25/2-0.75/2)} | |
615 | iNew{"SpecialMesh",FootWedge,MeshType="Wedge"} | |
616 | local FootPart = iPart{Suit,1.5/4,0.5,0.25,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
617 | iNew{"Weld",Suit,Part0=RFoot,Part1=FootPart,C0=cn((0.75-(1.5/4)*1.5)*i,0,-2.25/2-0.25/2)} | |
618 | local FootPart = iPart{Suit,1.5/4,0.5,1,co=cc[1],mt="DiamondPlate"} LastMade.CanCollide = false | |
619 | iNew{"Weld",Suit,Part0=RFoot,Part1=FootPart,C0=cn((0.75-(1.5/4)*1.5)*i,0,-2.5/2-1/2-0.125)} | |
620 | iNew{"SpecialMesh",FootPart,MeshType="Wedge"} | |
621 | end | |
622 | for i=-1,1,1 do | |
623 | local Bolt = iPart{Suit,0.3,0.2,0.3,co=cc[2],mt="DiamondPlate"} LastMade.CanCollide = false | |
624 | iNew{"Weld",Suit,Part0=FootT2,Part1=Bolt,C0=cn(0.5*i,-0.1,i==0 and -0.9 or -0.75)} | |
625 | iNew{"CylinderMesh",Bolt,Scale=v3(1,0.5,1)} | |
626 | end | |
627 | ||
628 | Char:MoveTo(Torso.Position+v3(0,10,0)) | |
629 | ||
630 | function AoEFind(Pos,Range) | |
631 | local fHumans = {} | |
632 | for i,v in pairs(workspace:GetChildren()) do | |
633 | local fHum,fTorso,fHead = GetHuman(v) | |
634 | if fHum and fTorso and fHead and v.Name~=Player.Name then | |
635 | if (fTorso.Position-Pos).magnitude<=Range then | |
636 | table.insert(fHumans,v) | |
637 | end | |
638 | end | |
639 | end | |
640 | return fHumans | |
641 | end | |
642 | ||
643 | HitData = {} | |
644 | function AoEBreak(Pos,Range,Force,PropDmg) | |
645 | local function r(d) | |
646 | for i,v in pairs(d:GetChildren()) do | |
647 | if v:IsA("BasePart") and v.Name~="Terrain" then | |
648 | if (v.Position-Pos).magnitude<Range then | |
649 | local fHum,fTorso,fHead = GetHuman(v.Parent) | |
650 | if fHum and fTorso and fHead then return end | |
651 | if v:IsDescendantOf(Char) or v.Name=="unray" then return end | |
652 | ||
653 | local broke = false | |
654 | if not HitData[v] then | |
655 | local hh = v:GetMass()/1.5 | |
656 | HitData[v] = hh | |
657 | end | |
658 | HitData[v]=HitData[v]-PropDmg | |
659 | if HitData[v]<=0 then | |
660 | v.Anchored = false | |
661 | v:BreakJoints() | |
662 | broke=true | |
663 | end | |
664 | if broke then | |
665 | v.Velocity=cn(Pos,v.Position).lookVector*Force | |
666 | end | |
667 | end | |
668 | else | |
669 | r(v) | |
670 | end | |
671 | end | |
672 | end | |
673 | r(workspace) | |
674 | end | |
675 | ||
676 | function GetHuman(model) | |
677 | local foundHum | |
678 | local foundTorso | |
679 | local foundHead | |
680 | if #model:GetChildren()==0 then return end | |
681 | for i,v in pairs(model:GetChildren()) do | |
682 | if v:IsA("Humanoid") then | |
683 | foundHum = v | |
684 | elseif v.Name == "Torso" then | |
685 | foundTorso = v | |
686 | elseif v.Name == "Head" then | |
687 | foundHead = v | |
688 | end | |
689 | end | |
690 | return foundHum,foundTorso,foundHead | |
691 | end | |
692 | ||
693 | function Knockback(fTor,face,str,dur) | |
694 | local bodyVelo = iNew{"BodyVelocity",fTor,P=1250,maxForce=v3(1,1,1)/0,velocity=cn(face,fTor.Position).lookVector*str} | |
695 | deb:AddItem(bodyVelo,dur) | |
696 | end | |
697 | ||
698 | HitData = {} | |
699 | function Touched(hit) | |
700 | if not Dmg then return end | |
701 | if hit.Parent:IsDescendantOf(Char) then return end | |
702 | local fHum,fTorso,fHead = GetHuman(hit.Parent) | |
703 | if fHum and fTorso and fHead then | |
704 | Damage(fHum,mran(Dmgv[1],Dmgv[2])) | |
705 | end | |
706 | ||
707 | if ArmAnim == "Lightning Fist" then | |
708 | local BlastPos = (Hole.CFrame).p | |
709 | local at = BlastPos+v3(0,-5,0) | |
710 | ArmAnim = "Lightning Blast" | |
711 | local Prev = Knockback | |
712 | MeshEffect(workspace,cn(at),14,14,14,0.05,"New Yeller","Sphere",cn()) | |
713 | MeshEffect(workspace,cn(at),9,14,9,0.05,"New Yeller",as.Blast,ca(0,mran(-5,5),0)) | |
714 | for i=360/8,360,360/8 do | |
715 | MeshEffect(workspace,cn(at)*ca(0,i,0)*cn(0,2,3)*ca(-90,0,0),1.5,8,1.5,0.05,"New Yeller",as.Diamond,cn(0,1.5,0)*ca(1,0,0)) | |
716 | if i==360/8 then | |
717 | local fHumans = AoEFind(BlastPos,10) | |
718 | AoEBreak(BlastPos,10,50,mran(35,50)) | |
719 | if #fHumans > 0 then | |
720 | for i,v in pairs(fHumans) do | |
721 | local fHum,fTorso,fHead = v.Humanoid,v.Torso,v.Head | |
722 | Damage(fHum,mran(Dmgv[1],Dmgv[2])*2.5) | |
723 | Knockback(fTorso,BlastPos,35,0.25) | |
724 | end | |
725 | end | |
726 | end | |
727 | end | |
728 | end | |
729 | end | |
730 | ||
731 | for i,v in pairs(Suit:GetChildren()) do | |
732 | if v:IsA("BasePart") and (v.Name=="Saw" or v.Name=="Chakram") then | |
733 | v.Touched:connect(Touched) | |
734 | end | |
735 | end | |
736 | ||
737 | for i,v in pairs(Torso:children()) do | |
738 | if v:IsA("Sound") then | |
739 | v:Destroy() | |
740 | end | |
741 | end | |
742 | for i,v in pairs(Head:children()) do | |
743 | if v:IsA("Sound") then | |
744 | v:Destroy() | |
745 | end | |
746 | end | |
747 | ||
748 | ||
749 | function ReturnPose(AnimationSpeed) | |
750 | RePose() | |
751 | for i=1,AnimationSpeed do | |
752 | if not Walking then | |
753 | SetWeld(LAW,0,i,AnimationSpeed,wLA,wLA2,PoseLA,PoseLA2,1) | |
754 | SetWeld(RAW,0,i,AnimationSpeed,wRA,wRA2,PoseRA,PoseRA2,1) | |
755 | for lever = 1,2 do | |
756 | local x = lever == 1 and -1 or lever == 2 and 1 | |
757 | SetWeld(Levers[lever][1],0,i,AnimationSpeed,Levers[lever][2],Levers[lever][3],v3(x,0.6,-1.5),v3(0,0,0),1) | |
758 | end | |
759 | end | |
760 | SetWeld(Root,0,i,AnimationSpeed,wRT,wRT2,PoseRT,PoseRT2,1) | |
761 | SetWeld(wStand,0,i,AnimationSpeed,wST,wST2,PoseST,PoseST2,1) | |
762 | SetWeld(wBall,0,i,AnimationSpeed,wBA,wBA2,PoseBA,PoseBA2,1) | |
763 | SetWeld(wLArm,0,i,AnimationSpeed,wLAR,wLAR2,PoseLAR,PoseLAR2,1) | |
764 | SetWeld(wLArm2,0,i,AnimationSpeed,wLARM,wLARM2,PoseLARM,PoseLARM2,1) | |
765 | SetWeld(wRArm,0,i,AnimationSpeed,wRAR,wRAR2,PoseRAR,PoseRAR2,1) | |
766 | SetWeld(wRArm2,0,i,AnimationSpeed,wRARM,wRARM2,PoseRARM,PoseRARM2,1) | |
767 | SetWeld(wLLeg,0,i,AnimationSpeed,wLLE,wLLE2,PoseLLE,PoseLLE2,1) | |
768 | SetWeld(wLLeg2,0,i,AnimationSpeed,wLLEG,wLLEG2,PoseLLEG,PoseLLEG2,1) | |
769 | SetWeld(wLLeg3,0,i,AnimationSpeed,wLLL,wLLL2,PoseLLL,PoseLLL2,1) | |
770 | SetWeld(wRLeg,0,i,AnimationSpeed,wRLE,wRLE2,PoseRLE,PoseRLE2,1) | |
771 | SetWeld(wRLeg2,0,i,AnimationSpeed,wRLEG,wRLEG2,PoseRLEG,PoseRLEG2,1) | |
772 | SetWeld(wRLeg3,0,i,AnimationSpeed,wRLL,wRLL2,PoseRLL,PoseRLL2,1) | |
773 | wait(0) | |
774 | end | |
775 | end | |
776 | ||
777 | function RePose() | |
778 | local a,b=GetWeld(LAW) | |
779 | local c,d=GetWeld(RAW) | |
780 | local ee,ff=GetWeld(Root) | |
781 | wLA=a wLA2=b | |
782 | wRA=c wRA2=d | |
783 | wRT=ee wRT2=ff | |
784 | local e,f=GetWeld(wStand) | |
785 | local g,h=GetWeld(wBall) | |
786 | local i,j=GetWeld(wLArm) | |
787 | local k,l=GetWeld(wLArm2) | |
788 | local m,n=GetWeld(wRArm) | |
789 | local o,p=GetWeld(wRArm2) | |
790 | local q,r=GetWeld(wLLeg) | |
791 | local s,t=GetWeld(wLLeg2) | |
792 | local y,z=GetWeld(wLLeg3) | |
793 | local u,v=GetWeld(wRLeg) | |
794 | local w,x=GetWeld(wRLeg2) | |
795 | local aa,bb=GetWeld(wRLeg3) | |
796 | for lever = 1,2 do Levers[lever][2],Levers[lever][3]=GetWeld(Levers[lever][1]) end | |
797 | wST=e wST2=f | |
798 | wBA=g wBA2=h | |
799 | wLAR=i wLAR2=j | |
800 | wLARM=k wLARM2=l | |
801 | wRAR=m wRAR2=n | |
802 | wRARM=o wRARM2=p | |
803 | wLLE=q wLLE2=r | |
804 | wLLEG=s wLLEG2=t | |
805 | wLLL=y wLLL2=z | |
806 | wRLE=u wRLE2=v | |
807 | wRLEG=w wRLEG2=x | |
808 | wRLL=aa wRLL2=bb | |
809 | end | |
810 | ||
811 | ||
812 | Attacks = {} | |
813 | Attacks[1] = function() | |
814 | ArmAnim = "Slash" | |
815 | if TorsoAnim == "" then TorsoAnim = ArmAnim end | |
816 | RePose() | |
817 | for i=1,ASpeed do | |
818 | SetWeld(wLArm,0,i,ASpeed,wLAR,wLAR2,PoseLAR,v3(-35,0,-45),1) | |
819 | SetWeld(wLArm2,0,i,ASpeed,wLARM,wLARM2,PoseLARM,v3(0,-65,-65),1) | |
820 | wait(0) | |
821 | end | |
822 | Mult = 2 | |
823 | Trail = true | |
824 | RePose() | |
825 | for i=1,ASpeed/1.6 do | |
826 | if TorsoAnim == ArmAnim then | |
827 | SetWeld(Root,0,i,ASpeed/1.6,wRT,wRT2,PoseRT,v3(0,-70,0),1) | |
828 | SetWeld(wStand,0,i,ASpeed/1.6,wST,wST2,PoseST,v3(0,-70,0),1) | |
829 | SetWeld(wBall,0,i,ASpeed/1.6,wBA,wBA2,PoseBA,v3(0,70,0),1) | |
830 | end | |
831 | SetWeld(wLArm,0,i,ASpeed/1.6,wLAR,wLAR2,PoseLAR,v3(-140,0,60),1) | |
832 | SetWeld(wLArm2,0,i,ASpeed/1.6,wLARM,wLARM2,PoseLARM,v3(0,-45,-25),1) | |
833 | wait(0) | |
834 | end | |
835 | Mult = 1 | |
836 | Trail = false | |
837 | ReturnPose(ASpeed) | |
838 | ArmAnim = "" | |
839 | TorsoAnim = TorsoAnim~="" and "" or TorsoAnim | |
840 | end | |
841 | Attacks[2] = function() | |
842 | ArmAnim = "AoE Slash" | |
843 | if TorsoAnim == "" then TorsoAnim = ArmAnim end | |
844 | local Ang = MouseAngleY>25 and 25 or MouseAngleY<-35 and -35 or MouseAngleY | |
845 | RePose() | |
846 | for i=1,ASpeed do | |
847 | if TorsoAnim == ArmAnim then | |
848 | SetWeld(Root,0,i,ASpeed,wRT,wRT2,PoseRT,v3(0,-70,0),1) | |
849 | SetWeld(wStand,0,i,ASpeed,wST,wST2,PoseST,v3(0,-70,0),1) | |
850 | SetWeld(wBall,0,i,ASpeed,wBA,wBA2,PoseBA,v3(0,70,0),1) | |
851 | end | |
852 | SetWeld(wLArm,0,i,ASpeed,wLAR,wLAR2,PoseLAR,v3(-90,0,-Ang),1) | |
853 | SetWeld(wLArm2,0,i,ASpeed,wLARM,wLARM2,PoseLARM,v3(-70,90,0),1) | |
854 | wait(0) | |
855 | end | |
856 | Mult = 2 | |
857 | Trail = true | |
858 | RePose() | |
859 | for i=1,ASpeed/1.6 do | |
860 | if TorsoAnim == ArmAnim then | |
861 | SetWeld(Root,0,i,ASpeed/1.6,wRT,wRT2,PoseRT,v3(0,100,0),1) | |
862 | SetWeld(wStand,0,i,ASpeed/1.6,wST,wST2,PoseST,v3(0,100,0),1) | |
863 | SetWeld(wBall,0,i,ASpeed/1.6,wBA,wBA2,PoseBA,v3(0,-100,0),1) | |
864 | end | |
865 | SetWeld(wLArm,0,i,ASpeed/1.6,wLAR,wLAR2,PoseLAR,v3(70,0,-Ang),1) | |
866 | SetWeld(wLArm2,0,i,ASpeed/1.6,wLARM,wLARM2,PoseLARM,v3(20,90,0),1) | |
867 | wait(0) | |
868 | end | |
869 | Mult = 1 | |
870 | Trail = false | |
871 | ReturnPose(ASpeed) | |
872 | ArmAnim = "" | |
873 | TorsoAnim = TorsoAnim~="" and "" or TorsoAnim | |
874 | end | |
875 | Attacks[3] = function() | |
876 | ArmAnim = "Lightning Fist Start" | |
877 | TorsoAnim = ArmAnim | |
878 | RePose() | |
879 | for i=1,ASpeed*1.5 do | |
880 | if TorsoAnim == ArmAnim then | |
881 | SetWeld(Root,0,i,ASpeed*1.5,wRT,wRT2,PoseRT,v3(0,-70,0),1) | |
882 | SetWeld(wStand,0,i,ASpeed*1.5,wST,wST2,PoseST,v3(0,-70,0),1) | |
883 | SetWeld(wBall,0,i,ASpeed*1.5,wBA,wBA2,PoseBA,v3(0,70,0),1) | |
884 | end | |
885 | SetWeld(wRArm,0,i,ASpeed*1.5,wRAR,wRAR2,PoseRAR,v3(0,50,70),1) | |
886 | SetWeld(wRArm2,0,i,ASpeed*1.5,wRARM,wRARM2,PoseRARM,v3(0,0,-140),1) | |
887 | wait(0) | |
888 | end | |
889 | Trail2 = true | |
890 | ||
891 | PlaySound(as.ElectricShock,0.85,1,Torso) | |
892 | RePose() | |
893 | for i=1,ASpeed do | |
894 | if TorsoAnim == ArmAnim then | |
895 | SetWeld(Root,0,i,ASpeed,wRT,wRT2,PoseRT,v3(0,80,0),1) | |
896 | SetWeld(wStand,0,i,ASpeed,wST,wST2,PoseST,v3(0,80,0),1) | |
897 | SetWeld(wBall,0,i,ASpeed,wBA,wBA2,PoseBA,v3(0,-80,0),1) | |
898 | end | |
899 | SetWeld(wRArm,0,i,ASpeed,wRAR,wRAR2,PoseRAR,v3(0,35,-70),1) | |
900 | SetWeld(wRArm2,0,i,ASpeed,wRARM,wRARM2,PoseRARM,v3(0,0,0),1) | |
901 | wait(0) | |
902 | if i==ASpeed-1 then ArmAnim = "Lightning Fist" end | |
903 | end | |
904 | Trail2 = false | |
905 | wait(0.5) | |
906 | ReturnPose(ASpeed) | |
907 | ArmAnim = "" | |
908 | TorsoAnim = TorsoAnim~="" and "" or TorsoAnim | |
909 | end | |
910 | Attacks[4] = function() | |
911 | ArmAnim = "Shoot" | |
912 | TorsoAnim = ArmAnim | |
913 | RePose() | |
914 | for i=1,ASpeed*1.5 do | |
915 | if TorsoAnim == ArmAnim then | |
916 | SetWeld(Root,0,i,ASpeed*1.5,wRT,wRT2,PoseRT,v3(0,90,0),1) | |
917 | SetWeld(wStand,0,i,ASpeed*1.5,wST,wST2,PoseST,v3(0,90,0),1) | |
918 | SetWeld(wBall,0,i,ASpeed*1.5,wBA,wBA2,PoseBA,v3(0,-90,0),1) | |
919 | end | |
920 | SetWeld(wRArm,0,i,ASpeed*1.5,wRAR,wRAR2,PoseRAR,v3(0,0,MouseAngleY),1) | |
921 | SetWeld(wRArm2,0,i,ASpeed*1.5,wRARM,wRARM2,PoseRARM,v3(0,0,0),1) | |
922 | wait(0) | |
923 | end | |
924 | Trail2 = true | |
925 | ||
926 | PlaySound(as.ElectricShock,0.85,1,Torso) | |
927 | RePose() | |
928 | for i=1,ASpeed do | |
929 | if TorsoAnim == ArmAnim then | |
930 | SetWeld(Root,0,i,ASpeed,wRT,wRT2,PoseRT,v3(0,80,0),1) | |
931 | SetWeld(wStand,0,i,ASpeed,wST,wST2,PoseST,v3(0,80,0),1) | |
932 | SetWeld(wBall,0,i,ASpeed,wBA,wBA2,PoseBA,v3(0,-80,0),1) | |
933 | end | |
934 | SetWeld(wRArm,0,i,ASpeed,wRAR,wRAR2,PoseRAR,v3(0,35,-70),1) | |
935 | SetWeld(wRArm2,0,i,ASpeed,wRARM,wRARM2,PoseRARM,v3(0,0,0),1) | |
936 | wait(0) | |
937 | if i==ASpeed-1 then ArmAnim = "Lightning Fist" end | |
938 | end | |
939 | Trail2 = false | |
940 | wait(0.5) | |
941 | ReturnPose(ASpeed) | |
942 | Gyro = false | |
943 | ArmAnim = "" | |
944 | TorsoAnim = TorsoAnim~="" and "" or TorsoAnim | |
945 | end | |
946 | ||
947 | BP = iNew{"BodyPosition",Stand,maxForce=v3(0,0,0)} | |
948 | ||
949 | ArmAnim = "" | |
950 | LegAnim = "" | |
951 | TorsoAnim = "" | |
952 | ASpeed = 12 | |
953 | SawSpeed = 5 | |
954 | Trail = false | |
955 | Trail2 = false | |
956 | State = "Idling" | |
957 | GroundOffset = v3(0,6.75,0) | |
958 | PoseLA=v3(-1.5,0.5,-0.5) PoseLA2=v3(110,0,14) | |
959 | PoseRA=v3(1.5,0.5,-0.5) PoseRA2=v3(110,0,-14) | |
960 | PoseRT=v3(0,0,0) PoseRT2=v3(0,0,0) | |
961 | PoseST=v3(0,0,0) PoseST2=v3(0,0,0) | |
962 | PoseBA=v3(0,-1.5,0) PoseBA2=v3(0,0,0) | |
963 | PoseLAR=v3(0,0,0) PoseLAR2=v3(-35,0,45) | |
964 | PoseLARM=v3(0,0.75,0) PoseLARM2=v3(-80,100,0) | |
965 | PoseRAR=v3(0,0,0) PoseRAR2=v3(0,-35,-50) | |
966 | PoseRARM=v3(0,0.75,0) PoseRARM2=v3(0,90,-65) | |
967 | PoseLLE=v3(-1.5,-1.25,-0.25) PoseLLE2=v3(20,0,-15) | |
968 | PoseLLEG=v3(0,-0.75,0) PoseLLEG2=v3(-40,0,15) | |
969 | PoseLLL=v3(0,-0.5,0) PoseLLL2=v3(20,0,0) | |
970 | PoseRLE=v3(1.5,-1.25,-0.25) PoseRLE2=v3(20,0,15) | |
971 | PoseRLEG=v3(0,-0.75,0) PoseRLEG2=v3(-40,0,-15) | |
972 | PoseRLL=v3(0,-0.5,0) PoseRLL2=v3(20,0,0) | |
973 | ||
974 | Arms() Legs() | |
975 | ReturnPose(ASpeed) | |
976 | Arms(0) Legs(0) | |
977 | ||
978 | ||
979 | button1 = false | |
980 | keys = {} | |
981 | Mouse.Button1Down:connect(function() | |
982 | button1 = true | |
983 | if ArmAnim == "" then | |
984 | Attacks[1]() | |
985 | end | |
986 | end) | |
987 | ||
988 | Mouse.Button1Up:connect(function() | |
989 | button1 = false | |
990 | end) | |
991 | ||
992 | Mouse.KeyDown:connect(function(key) | |
993 | keys[key]=true | |
994 | if key == "q" then | |
995 | if ArmAnim == "" then | |
996 | Attacks[2]() | |
997 | end | |
998 | end | |
999 | if key == "e" then | |
1000 | if ArmAnim == "" then | |
1001 | Attacks[3]() | |
1002 | end | |
1003 | end | |
1004 | if key == "r" then | |
1005 | if ArmAnim == "" then | |
1006 | Attacks[4]() | |
1007 | end | |
1008 | end | |
1009 | if key == " " then | |
1010 | local hit,at = Raycast(Torso.Position,Torso.Position - (Torso.CFrame*cn(0,3,0)).p,10,Char) | |
1011 | if not hit or not at then return end | |
1012 | if ArmAnim == "" and TorsoAnim == "" and LegAnim == "" then | |
1013 | ArmAnim = "Jump" | |
1014 | LegAnim = "JumpS" | |
1015 | local PrevOff = GroundOffset | |
1016 | GroundOffset = v3(0,6,0) | |
1017 | ReturnPose(1) | |
1018 | RePose() | |
1019 | for i=1,ASpeed do | |
1020 | SetWeld(wLLeg,0,i,ASpeed,wLLE,wLLE2,PoseLLE,v3(15,0,-20),1) | |
1021 | SetWeld(wLLeg2,0,i,ASpeed,wLLEG,wLLEG2,PoseLLEG,v3(-45,-35,20),1) | |
1022 | SetWeld(wLLeg3,0,i,ASpeed,wLLL,wLLL2,PoseLLL,v3(30,35,0),0) | |
1023 | SetWeld(wRLeg,0,i,ASpeed,wRLE,wRLE2,PoseRLE,v3(15,0,20),1) | |
1024 | SetWeld(wRLeg2,0,i,ASpeed,wRLEG,wRLEG2,PoseRLEG,v3(-45,35,-20),1) | |
1025 | SetWeld(wRLeg3,0,i,ASpeed,wRLL,wRLL2,PoseRLL,v3(30,-35,0),0) | |
1026 | wait(0) | |
1027 | end | |
1028 | LegAnim = "Jump" | |
1029 | GroundOffset = v3(0,18,0) | |
1030 | RePose() | |
1031 | for i=1,ASpeed/1.5 do | |
1032 | SetWeld(wLLeg,0,i,ASpeed/1.5,wLLE,wLLE2,PoseLLE,v3(25,0,-20),1) | |
1033 | SetWeld(wLLeg2,0,i,ASpeed/1.5,wLLEG,wLLEG2,PoseLLEG,v3(-10,-35,20),1) | |
1034 | SetWeld(wLLeg3,0,i,ASpeed,wLLL,wLLL2,PoseLLL,v3(15,35,0),0) | |
1035 | SetWeld(wRLeg,0,i,ASpeed/1.5,wRLE,wRLE2,PoseRLE,v3(25,0,20),1) | |
1036 | SetWeld(wRLeg2,0,i,ASpeed/1.5,wRLEG,wRLEG2,PoseRLEG,v3(-10,35,-20),1) | |
1037 | SetWeld(wRLeg3,0,i,ASpeed,wRLL,wRLL2,PoseRLL,v3(15,-35,0),0) | |
1038 | wait(0) | |
1039 | end | |
1040 | GroundOffset = PrevOff | |
1041 | ReturnPose(ASpeed) | |
1042 | ArmAnim = ArmAnim~="" and "" or ArmAnim | |
1043 | LegAnim = LegAnim~="" and "" or LegAnim | |
1044 | end | |
1045 | end | |
1046 | end) | |
1047 | ||
1048 | Mouse.KeyUp:connect(function(key) | |
1049 | keys[key]=false | |
1050 | end) | |
1051 | Humanoid.Changed:connect(function(prop) | |
1052 | if prop == "Health" then | |
1053 | if PrevHealth-Humanoid.Health>0 then | |
1054 | for i,v in pairs(game:GetService("Players"):GetChildren()) do | |
1055 | if not v:IsA("Player") or not v.Character.Parent then return end | |
1056 | local fHum,fTorso,fHead = GetHuman(v.Character) | |
1057 | if not fHum or not fTorso then return end | |
1058 | if v.Name~=Player.Name then | |
1059 | local Dist = (v.Character.Torso.Position-Torso.Position).magnitude | |
1060 | if Dist<25 then | |
1061 | Damage(v.Character.Humanoid,math.ceil((PrevHealth-Humanoid.Health)*0.75)) | |
1062 | Lightning(Hole.Position,fTorso.Position,mran(3,6),5,"New Yeller",0.3,mran2(0.5,0.9)) | |
1063 | PlaySound(as.ElectricShock,1,1,Torso) | |
1064 | end | |
1065 | end | |
1066 | end | |
1067 | end | |
1068 | end | |
1069 | end) | |
1070 | ||
1071 | Spawn(function() | |
1072 | while Suit.Parent do | |
1073 | for ii,vv in pairs(Saws) do | |
1074 | Spawn(function() | |
1075 | for i=0,180,360/(200/SawSpeed) do | |
1076 | vv[2].C0=cn(-1.25/2-0.5,0,0)*ca(0,i,0)*cn(0,0,-1.25/2) | |
1077 | wait(0) | |
1078 | end | |
1079 | for i=-1.25/2,1.25+0.3,(1.25/40)*SawSpeed do | |
1080 | vv[2].C0=cn(-0.5+i,0,1.25/2) | |
1081 | wait(0) | |
1082 | end | |
1083 | for i=180,360,360/(200/SawSpeed) do | |
1084 | vv[2].C0=cn(1.25/2+0.4,0,0)*ca(0,i,0)*cn(0,0,-1.25/2) | |
1085 | wait(0) | |
1086 | end | |
1087 | for i=1.25/2,-1.25-0.3,-(1.25/40)*SawSpeed do | |
1088 | vv[2].C0=cn(0.4+i,0,-1.25/2) | |
1089 | wait(0) | |
1090 | end | |
1091 | end) | |
1092 | wait(0.08) | |
1093 | end | |
1094 | wait(0) | |
1095 | end | |
1096 | end) | |
1097 | ||
1098 | Count = 0 | |
1099 | game:GetService("RunService").RenderStepped:connect(function() | |
1100 | if Suit.Parent then | |
1101 | Count = Count+1 | |
1102 | local hit,at = Raycast(Stand.Position,Stand.Position - (Stand.CFrame*cn(0,3,0)).p,10,Char) | |
1103 | if hit and at then | |
1104 | BP.position = at+GroundOffset | |
1105 | BP.maxForce = v3(0,1/0,0) | |
1106 | else | |
1107 | BP.maxForce = v3() | |
1108 | end | |
1109 | local CurrentPos = ArmSawP.CFrame*cn(0,0,-0.5) | |
1110 | if Trail then | |
1111 | if LastPos and (ArmSawP.Position-LastPos.p).magnitude > 0.1 then | |
1112 | local h = 4.5 | |
1113 | local ft = 0.15 | |
1114 | local a,b = Triangle{(LastPos*cn(0,h/2,0)).p,(LastPos*cn(0,-h/2,0)).p,(CurrentPos*cn(0,h/2,0)).p} | |
1115 | if a then deb:AddItem(a,ft) end | |
1116 | if b then deb:AddItem(b,ft) end | |
1117 | local a,b = Triangle{(CurrentPos*cn(0,h/2,0)).p,(CurrentPos*cn(0,-h/2,0)).p,(LastPos*cn(0,-h/2,0)).p} | |
1118 | if a then deb:AddItem(a,ft) end | |
1119 | if b then deb:AddItem(b,ft) end | |
1120 | LastPos = CurrentPos | |
1121 | elseif not LastPos then | |
1122 | LastPos = CurrentPos | |
1123 | end | |
1124 | elseif not Trail then | |
1125 | LastPos = nil | |
1126 | end | |
1127 | if Trail2 then | |
1128 | if Count%1==0 then | |
1129 | local sc = 5 | |
1130 | local To = Hole.Position+v3(mran(-sc,sc),mran(-sc,sc),mran(-sc,sc)) | |
1131 | Lightning(Hole.Position,To,mran(3,6),mran(1,4),"New Yeller",0.2,mran2(0.5,0.9)) | |
1132 | end | |
1133 | end | |
1134 | wChakram.C0=cn(0,-1.4,0)*ca(90,0,Count*SawSpeed) | |
1135 | MouseAngleX = math.floor(cn(Head.Position,Mouse.Hit.p).lookVector.x*90) | |
1136 | MouseAngleY = math.floor(cn(Head.Position,Mouse.Hit.p).lookVector.y*90) | |
1137 | SetWeld(Neck,0,1,1,v3(),v3(),v3(0,1.5,-0.1),v3(MouseAngleY<-20 and -20 or MouseAngleY>45 and 45 or MouseAngleY,0,0),1) | |
1138 | PrevHealth = Humanoid.Health | |
1139 | Walking = v3(Torso.Velocity.x,0,Torso.Velocity.z).magnitude>1 and true or false | |
1140 | end | |
1141 | end) | |
1142 | while wait(0) do | |
1143 | if not Humanoid.PlatformStand and not Humanoid.Sit then | |
1144 | local AnimSpeed = ASpeed/1.5 | |
1145 | if Walking then | |
1146 | State = "Walking" | |
1147 | RePose() | |
1148 | Humanoid.WalkSpeed = 12 | |
1149 | for i=1,AnimSpeed do | |
1150 | if TorsoAnim == "" then | |
1151 | SetWeld(Root,0,i,AnimSpeed,wRT,wRT2,PoseRT,v3(0,-15,0),0) | |
1152 | SetWeld(wStand,0,i,AnimSpeed,wST,wST2,PoseST,v3(0,-15,0),0) | |
1153 | SetWeld(wBall,0,i,AnimSpeed,wBA,wBA2,PoseBA,v3(0,15,0),0) | |
1154 | end | |
1155 | if ArmAnim == "" then | |
1156 | SetWeld(wLArm,0,i,AnimSpeed,wLAR,wLAR2,PoseLAR,v3(-90,0,20),1) | |
1157 | SetWeld(wLArm2,0,i,AnimSpeed,wLARM,wLARM2,PoseLARM,v3(-45,90,0),1) | |
1158 | end | |
1159 | if LegAnim == "" then | |
1160 | SetWeld(wLLeg,0,i,AnimSpeed,wLLE,wLLE2,PoseLLE,v3(80,0,-20),0) | |
1161 | SetWeld(wLLeg2,0,i,AnimSpeed,wLLEG,wLLEG2,PoseLLEG,v3(-80,0,20),0) | |
1162 | SetWeld(wLLeg3,0,i,AnimSpeed,wLLL,wLLL2,PoseLLL,v3(0,-15,0),0) | |
1163 | SetWeld(wRLeg,0,i,AnimSpeed,wRLE,wRLE2,PoseRLE,v3(-35,0,20),0) | |
1164 | SetWeld(wRLeg2,0,i,AnimSpeed,wRLEG,wRLEG2,PoseRLEG,v3(-0,0,-20),0) | |
1165 | SetWeld(wRLeg3,0,i,AnimSpeed,wRLL,wRLL2,PoseRLL,v3(35,0,0),0) | |
1166 | end | |
1167 | SetWeld(RAW,0,i,AnimSpeed,wRA,wRA2,v3(1.5,0.5,0),PoseRA2,0) | |
1168 | SetWeld(LAW,0,i,AnimSpeed,wLA,wLA2,v3(-1.5,0.5,-1),PoseLA2,0) | |
1169 | for lever = 1,2 do | |
1170 | local x = lever == 1 and -1 or lever == 2 and 1 | |
1171 | SetWeld(Levers[lever][1],0,i,AnimSpeed,Levers[lever][2],Levers[lever][3],v3(x,0.6,-1.5),v3(25*x,0,0),0) | |
1172 | end | |
1173 | wait(0) | |
1174 | ||
1175 | if not Walking then | |
1176 | break | |
1177 | end | |
1178 | end | |
1179 | RePose() | |
1180 | Humanoid.WalkSpeed = 22 | |
1181 | for i=1,AnimSpeed/2.5 do | |
1182 | if LegAnim == "" then | |
1183 | SetWeld(wLLeg,0,i,AnimSpeed/2.5,wLLE,wLLE2,PoseLLE,v3(35,0,-20),0) | |
1184 | SetWeld(wLLeg2,0,i,AnimSpeed/2.5,wLLEG,wLLEG2,PoseLLEG,v3(-35,0,20),0) | |
1185 | SetWeld(wLLeg3,0,i,AnimSpeed/2.5,wLLL,wLLL2,PoseLLL,v3(0,-15,0),0) | |
1186 | SetWeld(wRLeg,0,i,AnimSpeed/2.5,wRLE,wRLE2,PoseRLE,v3(-65,0,20),0) | |
1187 | SetWeld(wRLeg2,0,i,AnimSpeed/2.5,wRLEG,wRLEG2,PoseRLEG,v3(-45,0,-20),0) | |
1188 | SetWeld(wRLeg3,0,i,AnimSpeed/2.5,wRLL,wRLL2,PoseRLL,v3(0,15,0),0) | |
1189 | end | |
1190 | SetWeld(RAW,0,i,AnimSpeed/2.5,wRA,wRA2,v3(1.5,0.5,0),PoseRA2,0) | |
1191 | SetWeld(LAW,0,i,AnimSpeed/2.5,wLA,wLA2,v3(-1.5,0.5,-1),PoseLA2,0) | |
1192 | for lever = 1,2 do | |
1193 | local x = lever == 1 and -1 or lever == 2 and 1 | |
1194 | SetWeld(Levers[lever][1],0,i,AnimSpeed/2.5,Levers[lever][2],Levers[lever][3],v3(x,0.6,-1.5),v3(25*x,0,0),0) | |
1195 | end | |
1196 | wait(0) | |
1197 | ||
1198 | if not Walking then | |
1199 | break | |
1200 | end | |
1201 | end | |
1202 | RePose() | |
1203 | Humanoid.WalkSpeed = 12 | |
1204 | for i=1,AnimSpeed do | |
1205 | if TorsoAnim == "" then | |
1206 | SetWeld(Root,0,i,AnimSpeed,wRT,wRT2,PoseRT,v3(0,15,0),0) | |
1207 | SetWeld(wStand,0,i,AnimSpeed,wST,wST2,PoseST,v3(0,15,0),0) | |
1208 | SetWeld(wBall,0,i,AnimSpeed,wBA,wBA2,PoseBA,v3(0,-15,0),0) | |
1209 | end | |
1210 | if LegAnim == "" then | |
1211 | SetWeld(wRLeg,0,i,AnimSpeed,wRLE,wRLE2,PoseRLE,v3(80,0,20),0) | |
1212 | SetWeld(wRLeg2,0,i,AnimSpeed,wRLEG,wRLEG2,PoseRLEG,v3(-80,0,-20),0) | |
1213 | SetWeld(wRLeg3,0,i,AnimSpeed,wRLL,wRLL2,PoseRLL,v3(0,15,0),0) | |
1214 | SetWeld(wLLeg,0,i,AnimSpeed,wLLE,wLLE2,PoseLLE,v3(-35,0,-20),0) | |
1215 | SetWeld(wLLeg2,0,i,AnimSpeed,wLLEG,wLLEG2,PoseLLEG,v3(-0,0,20),0) | |
1216 | SetWeld(wLLeg3,0,i,AnimSpeed,wLLL,wLLL2,PoseLLL,v3(35,-0,0),0) | |
1217 | ||
1218 | SetWeld(RAW,0,i,AnimSpeed,wRA,wRA2,v3(1.5,0.5,-1),PoseRA2,0) | |
1219 | SetWeld(LAW,0,i,AnimSpeed,wLA,wLA2,v3(-1.5,0.5,0),PoseLA2,0) | |
1220 | for lever = 1,2 do | |
1221 | local x = lever == 1 and -1 or lever == 2 and 1 | |
1222 | SetWeld(Levers[lever][1],0,i,AnimSpeed,Levers[lever][2],Levers[lever][3],v3(x,0.6,-1.5),v3(-25*x,0,0),0) | |
1223 | end | |
1224 | end | |
1225 | wait(0) | |
1226 | ||
1227 | if not Walking then | |
1228 | break | |
1229 | end | |
1230 | end | |
1231 | RePose() | |
1232 | Humanoid.WalkSpeed = 22 | |
1233 | for i=1,AnimSpeed/2.5 do | |
1234 | if LegAnim == "" then | |
1235 | SetWeld(wRLeg,0,i,AnimSpeed/2.5,wRLE,wRLE2,PoseRLE,v3(35,0,20),0) | |
1236 | SetWeld(wRLeg2,0,i,AnimSpeed/2.5,wRLEG,wRLEG2,PoseRLEG,v3(-35,0,-20),0) | |
1237 | SetWeld(wRLeg3,0,i,AnimSpeed/2.5,wRLL,wRLL2,PoseRLL,v3(0,15,0),0) | |
1238 | SetWeld(wLLeg,0,i,AnimSpeed/2.5,wLLE,wLLE2,PoseLLE,v3(-65,0,-20),0) | |
1239 | SetWeld(wLLeg2,0,i,AnimSpeed/2.5,wLLEG,wLLEG2,PoseLLEG,v3(-45,0,20),0) | |
1240 | SetWeld(wLLeg3,0,i,AnimSpeed/2.5,wLLL,wLLL2,PoseLLL,v3(0,-15,0),0) | |
1241 | ||
1242 | SetWeld(RAW,0,i,AnimSpeed/2.5,wRA,wRA2,v3(1.5,0.5,-1),PoseRA2,0) | |
1243 | SetWeld(LAW,0,i,AnimSpeed/2.5,wLA,wLA2,v3(-1.5,0.5,0),PoseLA2,0) | |
1244 | for lever = 1,2 do | |
1245 | local x = lever == 1 and -1 or lever == 2 and 1 | |
1246 | SetWeld(Levers[lever][1],0,i,AnimSpeed/2.5,Levers[lever][2],Levers[lever][3],v3(x,0.6,-1.5),v3(-25*x,0,0),0) | |
1247 | end | |
1248 | end | |
1249 | wait(0) | |
1250 | ||
1251 | if not Walking then | |
1252 | break | |
1253 | end | |
1254 | end | |
1255 | elseif Torso.Velocity.magnitude < 1 then | |
1256 | if State == "Walking" then | |
1257 | State = "Idling" | |
1258 | RePose() | |
1259 | for i=1,AnimSpeed do | |
1260 | if TorsoAnim == "" then | |
1261 | SetWeld(Root,0,i,ASpeed,wRT,wRT2,PoseRT,PoseRT2,0) | |
1262 | SetWeld(wStand,0,i,ASpeed,wST,wST2,PoseST,PoseST2,0) | |
1263 | SetWeld(wBall,0,i,AnimSpeed,wBA,wBA2,PoseBA,PoseBA2,0) | |
1264 | end | |
1265 | if LegAnim == "" then | |
1266 | SetWeld(wLLeg,0,i,AnimSpeed,wLLE,wLLE2,PoseLLE,PoseLLE2,0) | |
1267 | SetWeld(wLLeg2,0,i,AnimSpeed,wLLEG,wLLEG2,PoseLLEG,PoseLLEG2,0) | |
1268 | SetWeld(wLLeg3,0,i,AnimSpeed,wLLL,wLLL2,PoseLLL,PoseLLL2,0) | |
1269 | SetWeld(wRLeg,0,i,AnimSpeed,wRLE,wRLE2,PoseRLE,PoseRLE2,0) | |
1270 | SetWeld(wRLeg2,0,i,AnimSpeed,wRLEG,wRLEG2,PoseRLEG,PoseRLEG2,0) | |
1271 | SetWeld(wRLeg3,0,i,AnimSpeed,wRLL,wRLL2,PoseRLL,PoseRLL2,0) | |
1272 | end | |
1273 | wait(0) | |
1274 | ||
1275 | if Walking then | |
1276 | break | |
1277 | end | |
1278 | end | |
1279 | end | |
1280 | end | |
1281 | end | |
1282 | end |