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