SHOW:
|
|
- or go back to the newest paste.
1 | --[[qaeo baeo haeo]]-- | |
2 | wait(1 / 60) | |
3 | Effects = { } | |
4 | - | local Player = game.Players.localPlayer |
4 | + | local Player = game.Players.THECREATOR20029 |
5 | - | local Character = Player.Character |
5 | + | local Character = game.Players.THECREATOR20029.Character |
6 | local Humanoid = Character.Humanoid | |
7 | local mouse = Player:GetMouse() | |
8 | local m = Instance.new('Model', Character) | |
9 | m.Name = "WeaponModel" | |
10 | Character["Left Arm"]:remove() | |
11 | Character["Right Arm"]:remove() | |
12 | Character["Left Leg"]:remove() | |
13 | Character["Right Leg"]:remove() | |
14 | local Head = Character.Head | |
15 | local Torso = Character.Torso | |
16 | local cam = game.Workspace.CurrentCamera | |
17 | local RootPart = Character.HumanoidRootPart | |
18 | local RootJoint = RootPart.RootJoint | |
19 | local equipped = false | |
20 | local attack = false | |
21 | local Anim = 'Idle' | |
22 | local idle = 0 | |
23 | local attacktype = 1 | |
24 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
25 | local velocity = RootPart.Velocity.y | |
26 | local sine = 0 | |
27 | local change = 1 | |
28 | local mana = 0 | |
29 | local it =Instance.new | |
30 | vt=Vector3.new | |
31 | local grabbed = false | |
32 | local cf = CFrame.new | |
33 | local mr = math.rad | |
34 | local angles = CFrame.Angles | |
35 | local ud = UDim2.new | |
36 | local c3 = Color3.new | |
37 | for i,v in pairs(Character:GetChildren()) do | |
38 | if v:IsA("Accessory") then | |
39 | v:Destroy() | |
40 | end | |
41 | end | |
42 | local NeckCF = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
43 | Humanoid.Animator:Destroy() | |
44 | Character.Animate:Destroy() | |
45 | Head.Transparency = 1 | |
46 | Torso.Transparency = 1 | |
47 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
48 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
49 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
50 | ||
51 | Head.face:remove() | |
52 | function clerp(a, b, t) | |
53 | return a:lerp(b, t) | |
54 | end | |
55 | ||
56 | ||
57 | local RbxUtility = LoadLibrary("RbxUtility") | |
58 | local Create = RbxUtility.Create | |
59 | ||
60 | function RemoveOutlines(part) | |
61 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
62 | end | |
63 | ||
64 | function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
65 | local Part = Create("Part"){ | |
66 | Parent = Parent, | |
67 | Reflectance = Reflectance, | |
68 | Transparency = Transparency, | |
69 | CanCollide = false, | |
70 | Locked = true, | |
71 | BrickColor = BrickColor.new(tostring(BColor)), | |
72 | Name = Name, | |
73 | Size = Size, | |
74 | Material = Material, | |
75 | } | |
76 | RemoveOutlines(Part) | |
77 | return Part | |
78 | end | |
79 | ||
80 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
81 | local Msh = Create(Mesh){ | |
82 | Parent = Part, | |
83 | Offset = OffSet, | |
84 | Scale = Scale, | |
85 | } | |
86 | if Mesh == "SpecialMesh" then | |
87 | Msh.MeshType = MeshType | |
88 | Msh.MeshId = MeshId | |
89 | end | |
90 | return Msh | |
91 | end | |
92 | ||
93 | --[[Credits to SazErenos for his Artificial Heartbeat]]-- | |
94 | ||
95 | ArtificialHB = Instance.new("BindableEvent", script) | |
96 | ArtificialHB.Name = "Heartbeat" | |
97 | ||
98 | script:WaitForChild("Heartbeat") | |
99 | ||
100 | frame = 1 / 30 | |
101 | tf = 0 | |
102 | allowframeloss = false | |
103 | tossremainder = false | |
104 | lastframe = tick() | |
105 | script.Heartbeat:Fire() | |
106 | ||
107 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
108 | tf = tf + s | |
109 | if tf >= frame then | |
110 | if allowframeloss then | |
111 | script.Heartbeat:Fire() | |
112 | lastframe = tick() | |
113 | else | |
114 | for i = 1, math.floor(tf / frame) do | |
115 | script.Heartbeat:Fire() | |
116 | end | |
117 | lastframe = tick() | |
118 | end | |
119 | if tossremainder then | |
120 | tf = 0 | |
121 | else | |
122 | tf = tf - frame * math.floor(tf / frame) | |
123 | end | |
124 | end | |
125 | end) | |
126 | ||
127 | function swait(num) | |
128 | if num == 0 or num == nil then | |
129 | ArtificialHB.Event:wait() | |
130 | else | |
131 | for i = 0, num do | |
132 | ArtificialHB.Event:wait() | |
133 | end | |
134 | end | |
135 | end | |
136 | ||
137 | ||
138 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
139 | local Weld = Create("Weld"){ | |
140 | Parent = Parent, | |
141 | Part0 = Part0, | |
142 | Part1 = Part1, | |
143 | C0 = C0, | |
144 | C1 = C1, | |
145 | } | |
146 | return Weld | |
147 | end | |
148 | ||
149 | function rayCast(Position, Direction, Range, Ignore) | |
150 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
151 | end | |
152 | ||
153 | function CreateSound(id, par, vol, pit) | |
154 | coroutine.resume(coroutine.create(function() | |
155 | local sou = Instance.new("Sound", par or workspace) | |
156 | sou.Volume = vol | |
157 | sou.Pitch = pit or 1 | |
158 | sou.SoundId = id | |
159 | swait() | |
160 | sou:play() | |
161 | game:GetService("Debris"):AddItem(sou, 6) | |
162 | end)) | |
163 | end | |
164 | ||
165 | ||
166 | Handle=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Really black","Handle",Vector3.new(1, 1, 1)) | |
167 | HandleWeld=CreateWeld(m,Character["Torso"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0199661255, -0.0400784016, 0.15832901, 1, -5.67096185e-006, -2.38577304e-005, 5.6816225e-006, 0.999999344, 0.000446140766, 2.38577395e-005, -0.000446140766, 0.999999344)) | |
168 | Tock=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tock",Vector3.new(1, 1, 1)) | |
169 | TockWeld=CreateWeld(m,Handle,Tock,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.81469727e-006, -0.699996948, 7.00950623e-005, 1, 2.04636308e-011, 7.80528353e-008, -7.29414751e-008, 1.35121719e-010, 0.999998868, -2.04636308e-011, -0.999998868, -1.35550668e-010)) | |
170 | CreateMesh("CylinderMesh",Tock,"","",Vector3.new(0, 0, 0),Vector3.new(0.150000006, 0.75, 1)) | |
171 | Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1)) | |
172 | TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, 0.200067759, 0, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011)) | |
173 | CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005)) | |
174 | Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1)) | |
175 | TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, -0.199929476, -3.81469727e-006, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011)) | |
176 | CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005)) | |
177 | CreateMesh("SpecialMesh",Handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5)) | |
178 | Part=CreatePart(m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.540000021, 0.200000003, 0.460000038)) | |
179 | PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0200805664, -0.737700462, 0, -2.19000867e-007, -0.422617674, 0.906307518, -2.3091161e-007, 0.906307518, 0.422617704, -1, -1.16742285e-007, -2.98621671e-007)) | |
180 | CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
181 | LeftPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","LeftPeg",Vector3.new(1, 0.560000002, 1)) | |
182 | LeftPegWeld=CreateWeld(m,Handle,LeftPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.399997711, 0.779884815, 7.62939453e-006, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404)) | |
183 | CreateMesh("SpecialMesh",LeftPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988)) | |
184 | Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033)) | |
185 | PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.219978333, -0.00736188889, 0.492553711, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276)) | |
186 | CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1)) | |
187 | Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033)) | |
188 | PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.189998627, -0.00735902786, 0.49256134, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276)) | |
189 | CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1)) | |
190 | Poot=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003)) | |
191 | PartWeld=CreateWeld(m,Handle,Poot,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.502023697, -1.00622749, 0, -9.02868123e-006, -0.81915164, 0.573576152, 2.20012589e-006, 0.573576152, 0.81915164, -1, 8.65777929e-006, -3.37895472e-006)) | |
192 | CreateMesh("CylinderMesh",Poot,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5)) | |
193 | Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003)) | |
194 | PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0188560486, -0.944825172, 0, -1.92190091e-005, -0.422617674, 0.906307518, 1.27690937e-005, 0.906307518, 0.422617704, -1, 1.96949968e-005, -1.20244413e-005)) | |
195 | CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5)) | |
196 | RightPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","RightPeg",Vector3.new(1, 0.570000052, 1)) | |
197 | RightPegWeld=CreateWeld(m,Handle,RightPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.400005341, 0.784877062, 1.14440918e-005, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404)) | |
198 | CreateMesh("SpecialMesh",RightPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988)) | |
199 | Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003)) | |
200 | PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.853747368, -0.98065567, 3.81469727e-006, -4.15784598e-008, -0.965925038, 0.258818835, 1.37861207e-008, 0.258818835, 0.965925038, -1, 4.36907612e-008, -2.55568011e-009)) | |
201 | CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5)) | |
202 | ||
203 | function boom() | |
204 | attack = true | |
205 | d=Instance.new("Fire",Poot) | |
206 | d.Heat=0 | |
207 | d.Size=2 | |
208 | CreateSound("http://www.roblox.com/asset/?id=138931042",Torso,1,1) | |
209 | for i = 0, 1, 0.05 do | |
210 | swait() | |
211 | if Torsovelocity > 2 then | |
212 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
213 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
214 | else | |
215 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
216 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
217 | end | |
218 | Handle.BrickColor=BrickColor.new("Bright red") | |
219 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
220 | end | |
221 | for i = 0, 1, 0.05 do | |
222 | swait() | |
223 | if Torsovelocity > 2 then | |
224 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
225 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
226 | else | |
227 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
228 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
229 | end | |
230 | Handle.BrickColor=BrickColor.new("Black") | |
231 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
232 | end | |
233 | for i = 0, 1, 0.1 do | |
234 | swait() | |
235 | if Torsovelocity > 2 then | |
236 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
237 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
238 | else | |
239 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
240 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
241 | end | |
242 | Handle.BrickColor=BrickColor.new("Bright red") | |
243 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
244 | end | |
245 | for i = 0, 1, 0.1 do | |
246 | swait() | |
247 | if Torsovelocity > 2 then | |
248 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
249 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
250 | else | |
251 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
252 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
253 | end | |
254 | Handle.BrickColor=BrickColor.new("Black") | |
255 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
256 | end | |
257 | for i = 0, 1, 0.2 do | |
258 | swait() | |
259 | if Torsovelocity > 2 then | |
260 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
261 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
262 | else | |
263 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
264 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
265 | end | |
266 | Handle.BrickColor=BrickColor.new("Bright red") | |
267 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
268 | end | |
269 | for i = 0, 1, 0.2 do | |
270 | swait() | |
271 | if Torsovelocity > 2 then | |
272 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
273 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
274 | else | |
275 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
276 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
277 | end | |
278 | Handle.BrickColor=BrickColor.new("Black") | |
279 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
280 | end | |
281 | for i = 0, 1, 0.5 do | |
282 | swait() | |
283 | if Torsovelocity > 2 then | |
284 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
285 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
286 | else | |
287 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
288 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
289 | end | |
290 | Handle.BrickColor=BrickColor.new("Bright red") | |
291 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
292 | end | |
293 | for i = 0, 1, 0.5 do | |
294 | swait() | |
295 | if Torsovelocity > 2 then | |
296 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
297 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
298 | else | |
299 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
300 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
301 | end | |
302 | Handle.BrickColor=BrickColor.new("Black") | |
303 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
304 | end | |
305 | for i = 0, 1, 0.5 do | |
306 | swait() | |
307 | if Torsovelocity > 2 then | |
308 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
309 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
310 | else | |
311 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
312 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
313 | end | |
314 | Handle.BrickColor=BrickColor.new("Bright red") | |
315 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
316 | end | |
317 | for i = 0, 1, 0.5 do | |
318 | swait() | |
319 | if Torsovelocity > 2 then | |
320 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
321 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
322 | else | |
323 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
324 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
325 | end | |
326 | Handle.BrickColor=BrickColor.new("Black") | |
327 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
328 | end | |
329 | CreateSound("http://www.roblox.com/asset/?id=282185588",Torso,1,1) | |
330 | gg=Instance.new("Explosion") | |
331 | gg.Parent=Torso | |
332 | gg.Position=Torso.Position | |
333 | attack = false | |
334 | end | |
335 | ||
336 | --[[Attacks]]-- | |
337 | ||
338 | mouse.Button1Down:connect(function() | |
339 | - | if attack == false and attacktype == 1 then |
339 | + | if attack == true and attacktype == 1 then |
340 | boom() | |
341 | end | |
342 | end) | |
343 | ||
344 | ||
345 | Humanoid.WalkSpeed=10 | |
346 | --[[ Movement Detection ]]-- | |
347 | j=1 | |
348 | while true do | |
349 | swait() | |
350 | if j == 360 then | |
351 | j=1 | |
352 | else | |
353 | j=j+5 | |
354 | end | |
355 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
356 | velocity = RootPart.Velocity.y | |
357 | sine = sine + change | |
358 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
359 | if equipped == true or equipped == false then | |
360 | if RootPart.Velocity.y > 1 and hit == nil then | |
361 | Anim = "Jump" | |
362 | if attack == false then | |
363 | ||
364 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
365 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
366 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
367 | end | |
368 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
369 | Anim = "Fall" | |
370 | if attack == false then | |
371 | ||
372 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
373 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
374 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
375 | end | |
376 | elseif Torsovelocity < 1 and hit ~= nil then | |
377 | Anim = "Idle" | |
378 | if attack == false then | |
379 | change = 1 | |
380 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
381 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
382 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
383 | end | |
384 | elseif Torsovelocity > 2 and hit ~= nil then | |
385 | Anim = "Walk" | |
386 | if attack == false then | |
387 | RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
388 | LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3) | |
389 | TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3) | |
390 | end | |
391 | end | |
392 | end | |
393 | if #Effects > 0 then | |
394 | for e = 1, #Effects do | |
395 | if Effects[e] ~= nil then | |
396 | local Thing = Effects[e] | |
397 | if Thing ~= nil then | |
398 | local Part = Thing[1] | |
399 | local Mode = Thing[2] | |
400 | local Delay = Thing[3] | |
401 | local IncX = Thing[4] | |
402 | local IncY = Thing[5] | |
403 | local IncZ = Thing[6] | |
404 | if Thing[1].Transparency <= 1 then | |
405 | if Thing[2] == "Block1" then | |
406 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
407 | Mesh = Thing[1].Mesh | |
408 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
409 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
410 | elseif Thing[2] == "Block2" then | |
411 | Thing[1].CFrame = Thing[1].CFrame | |
412 | Mesh = Thing[7] | |
413 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
414 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
415 | elseif Thing[2] == "Cylinder" then | |
416 | Mesh = Thing[1].Mesh | |
417 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
418 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
419 | elseif Thing[2] == "Blood" then | |
420 | Mesh = Thing[7] | |
421 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
422 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
423 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
424 | elseif Thing[2] == "Elec" then | |
425 | Mesh = Thing[1].Mesh | |
426 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
427 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
428 | elseif Thing[2] == "Disappear" then | |
429 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
430 | elseif Thing[2] == "Shatter" then | |
431 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
432 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
433 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
434 | Thing[6] = Thing[6] + Thing[5] | |
435 | end | |
436 | else | |
437 | Part.Parent = nil | |
438 | table.remove(Effects, e) | |
439 | end | |
440 | end | |
441 | end | |
442 | end | |
443 | end | |
444 | end |