SHOW:
|
|
- or go back to the newest paste.
1 | - | ------------------------- |
1 | + | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end |
2 | - | --skarp laser raser-- |
2 | + | print("FE Compatibility: by WaverlyCole & Mokiros") |
3 | - | ------------------------- |
3 | + | InternalData = {} |
4 | - | --By -- |
4 | + | do |
5 | - | --CKbackup- |
5 | + | script.Parent = owner.Character |
6 | - | ----------- |
6 | + | local Event = Instance.new("RemoteEvent") |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | if Index == "PlrObj" then | |
88 | return RealPlayer | |
89 | end | |
90 | return RealPlayer[Index] | |
91 | end | |
92 | end; | |
93 | __tostring = function(self) | |
94 | return RealPlayer.Name | |
95 | end | |
96 | }) | |
97 | end | |
98 | end | |
99 | if RealGame[Index] then | |
100 | local Type = type(RealGame[Index]) | |
101 | if Type == "function" then | |
102 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
103 | return function (self,Service) | |
104 | if Service:lower() == "players" then | |
105 | return setmetatable({},{ | |
106 | __index = function (self2,Index2) | |
107 | local RealService = RealGame:GetService(Service) | |
108 | local Type2 = type(Index2) | |
109 | if Type2 == "function" then | |
110 | return function (self,...) | |
111 | return RealService[Index2](RealService,...) | |
112 | end | |
113 | else | |
114 | if Index2:lower() == "localplayer" then | |
115 | return Sandbox(owner) | |
116 | end | |
117 | return RealService[Index2] | |
118 | end | |
119 | end; | |
120 | __tostring = function(self) | |
121 | return RealGame:GetService(Service).Name | |
122 | end | |
123 | }) | |
124 | elseif Service:lower() == "contextactionservice" then | |
125 | return InternalData["ContextActionService"] | |
126 | elseif Service:lower() == "contextactionservice" then | |
127 | return InternalData["UserInputService"] | |
128 | elseif Service:lower() == "runservice" then | |
129 | return setmetatable({},{ | |
130 | __index = function(self2,Index2) | |
131 | local RealService = RealGame:GetService(Service) | |
132 | local Type2 = type(Index2) | |
133 | if Type2 == "function" then | |
134 | return function (self,...) | |
135 | return RealService[Index2](RealService,...) | |
136 | end | |
137 | else | |
138 | if Index2:lower() == "bindtorenderstep" then | |
139 | return function (self,Name,Priority,Function) | |
140 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
141 | end | |
142 | end | |
143 | if Index2:lower() == "renderstepped" then | |
144 | return RealService["Stepped"] | |
145 | end | |
146 | return RealService[Index2] | |
147 | end | |
148 | end | |
149 | }) | |
150 | else | |
151 | return RealGame:GetService(Service) | |
152 | end | |
153 | end | |
154 | end | |
155 | return function (self,...) | |
156 | return RealGame[Index](RealGame,...) | |
157 | end | |
158 | else | |
159 | if game:GetService(Index) then | |
160 | return game:GetService(Index) | |
161 | end | |
162 | return RealGame[Index] | |
163 | end | |
164 | else | |
165 | return nil | |
166 | end | |
167 | end | |
168 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = {} | |
169 | print("Complete! Running...") | |
170 | ||
171 | ||
172 | --//Paste script below this line. | |
173 | ||
174 | player = game.Players.LocalPlayer | |
175 | chara = player.Character | |
176 | debby = game.Debris | |
177 | Mouse = player:GetMouse() | |
178 | chara.Humanoid.WalkSpeed = 20 | |
179 | rs = game:GetService("RunService").RenderStepped | |
180 | attacking = false | |
181 | ||
182 | --Outfit-- | |
183 | New = function(Object, Parent, Name, Data) | |
184 | local Object = Instance.new(Object) | |
185 | for Index, Value in pairs(Data or {}) do | |
186 | Object[Index] = Value | |
187 | end | |
188 | Object.Parent = Parent | |
189 | Object.Name = Name | |
190 | return Object | |
191 | end | |
192 | ||
193 | BladeM = New("Model",chara,"BladeM",{}) | |
194 | Blade = New("Part",BladeM,"Blade",{Size = Vector3.new(0.25, 0.400000036, 4.25),CFrame = CFrame.new(-10.6186581, 3.17678142, -22.8749371, -3.39850521e-05, -0.866028011, 0.499995649, 4.42377857e-10, 0.499995828, 0.866028011, -1, 2.94322326e-05, -1.69919949e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,}) | |
195 | Mesh = New("SpecialMesh",Blade,"Mesh",{Scale = Vector3.new(0.75, 0.75, 0.75),MeshId = "rbxassetid://567385525",TextureId = "rbxassetid://567385661",MeshType = Enum.MeshType.FileMesh,}) | |
196 | SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
197 | STrail = New("Part",BladeM,"STrail",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 3.00000024, 0.200000003),CFrame = CFrame.new(-10.9177656, 2.85871983, -22.8999252, -7.84831172e-06, -0.499996543, 0.866027772, 2.41521539e-05, -0.866027653, -0.49999696, 1, 1.69922841e-05, 1.88728209e-05),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,}) | |
198 | Weld = New("ManualWeld",STrail,"Weld",{Part0 = STrail,Part1 = Blade,C0 = CFrame.new(0, 0, 0, -7.84829808e-06, 2.41521357e-05, 1, -0.499996603, -0.866027415, 1.69922878e-05, 0.866027534, -0.499996662, 1.88728318e-05),C1 = CFrame.new(0.0249977112, 0.10000515, -0.425002098, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),}) | |
199 | LauncherM = New("Model",chara,"LauncherM",{}) | |
200 | Launcher = New("Part",LauncherM,"Launcher",{Size = Vector3.new(0.600000024, 1, 1),CFrame = CFrame.new(-11.0414219, 1.85505056, -22.7000008, 0, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, -1, 0, 0),CanCollide = false,}) | |
201 | Mesh = New("SpecialMesh",Launcher,"Mesh",{MeshId = "rbxassetid://936687645",TextureId = "rbxassetid://936688160",MeshType = Enum.MeshType.FileMesh,}) | |
202 | LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
203 | LBarrel = New("Part",LauncherM,"LBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-13.7908401, 0.911291361, -22.7000027, 0, -0.258818865, 0.965925932, 0, 0.965925932, 0.258818865, -1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,}) | |
204 | Weld = New("ManualWeld",LBarrel,"Weld",{Part0 = LBarrel,Part1 = Launcher,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818865, 0.965925872, 0, 0.965925872, 0.258818865, 0),C1 = CFrame.new(1.90734863e-06, -0.199999809, -2.89999676, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),}) | |
205 | RifleM = New("Model",chara,"RifleM",{}) | |
206 | LaserRifle = New("Part",RifleM,"LaserRifle",{Size = Vector3.new(0.400000036, 1, 1),CFrame = CFrame.new(-12.1999998, 1.51739705, -23.4623299, 1, 0, 0, 0, 0.866025507, 0.499999911, 0, -0.499999911, 0.866025507),CanCollide = false,}) | |
207 | Mesh = New("SpecialMesh",LaserRifle,"Mesh",{MeshId = "rbxassetid://936683797",TextureId = "rbxassetid://936683315",MeshType = Enum.MeshType.FileMesh,}) | |
208 | RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
209 | RBarrel = New("Part",RifleM,"RBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-12.1999989, 0.804000676, -24.8979721, 1, 0, 0, 0, 0.866025567, 0.499999821, 0, -0.499999821, 0.866025567),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,}) | |
210 | Weld = New("ManualWeld",RBarrel,"Weld",{Part0 = RBarrel,Part1 = LaserRifle,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999791, 0, 0.499999791, 0.866025507),C1 = CFrame.new(9.53674316e-07, 0.100001335, -1.60000038, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),}) | |
211 | ||
212 | function CreateTrailObj(parent,color1,color2,ofsx,ofsz) | |
213 | local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)}) | |
214 | local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)}) | |
215 | local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001}) | |
216 | return TEff | |
217 | end | |
218 | ||
219 | SlashT = CreateTrailObj(STrail,"White","Royal purple",0,0) | |
220 | SlashT.LightEmission = 1 | |
221 | SlashT.Texture = "http://www.roblox.com/asset/?id=849899387" | |
222 | ||
223 | --Sounds-- | |
224 | function LoadSnd(id,loop,vol,pit) | |
225 | local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit}) | |
226 | return snd | |
227 | end | |
228 | SwingSnd = LoadSnd(158037267,false,1,1) | |
229 | Swing2Snd = LoadSnd(12222208,false,1,1) | |
230 | HitSnd = LoadSnd(153092274,false,1,1) | |
231 | ExpSnd = LoadSnd(142070127,false,1,1) | |
232 | FlySnd = LoadSnd(169445602,false,1,1) | |
233 | BExpSnd = LoadSnd(168586621,false,1,.5) | |
234 | GunFlameSnd = LoadSnd(169380505,false,1,1.5) | |
235 | ChargeSnd = LoadSnd(136007472,false,1,1) | |
236 | ||
237 | --Play Sound in Part-- | |
238 | function PlaySnd(snd,part) | |
239 | local sound = snd:Clone() | |
240 | sound.PlayOnRemove = true | |
241 | sound.Parent = part | |
242 | sound:Destroy() | |
243 | end | |
244 | ||
245 | --Damage Function-- | |
246 | function dealdmg(dude,damage,env,toim,kby,kbx) | |
247 | hurt = coroutine.wrap(function() | |
248 | if dude ~= chara and dude:FindFirstChild("IsHit") == nil then | |
249 | finaldmg = damage + math.random(-env,env) | |
250 | dude.Humanoid.Health = dude.Humanoid.Health - finaldmg | |
251 | local vall = Instance.new("ObjectValue",dude) | |
252 | vall.Name = "IsHit" | |
253 | debby:AddItem(vall,toim) | |
254 | local bfos = Instance.new("BodyVelocity",dude.Head) | |
255 | bfos.P = 20000 | |
256 | bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P) | |
257 | bfos.Velocity = Vector3.new(0,kby,0) + chara.HumanoidRootPart.CFrame.lookVector * kbx | |
258 | debby:AddItem(bfos,.1) | |
259 | local naeeym2 = Instance.new("BillboardGui",dude) | |
260 | naeeym2.Size = UDim2.new(0,100,0,40) | |
261 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
262 | naeeym2.Adornee = dude.Head | |
263 | naeeym2.Name = "TalkingBillBoard" | |
264 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
265 | tecks2.BackgroundTransparency = 1 | |
266 | tecks2.BorderSizePixel = 0 | |
267 | tecks2.Text = "-"..finaldmg | |
268 | tecks2.Font = "Fantasy" | |
269 | tecks2.FontSize = "Size24" | |
270 | tecks2.TextStrokeTransparency = 0 | |
271 | tecks2.TextColor3 = Color3.new(1,0.6,0) | |
272 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
273 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
274 | for i = 1, 5 do | |
275 | wait(.1) | |
276 | tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0) | |
277 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2 | |
278 | tecks2.TextTransparency = tecks2.TextTransparency + .2 | |
279 | end | |
280 | naeeym2:Destroy() | |
281 | end | |
282 | end) | |
283 | hurt(dude,damage,env,toim) | |
284 | end | |
285 | ||
286 | --Explode Hitbox-- | |
287 | function ExHitbox(rad,pos,damage,env,toim,kby,kbx) | |
288 | local E = Instance.new("Explosion") | |
289 | E.Position = pos | |
290 | E.Parent = game.Workspace | |
291 | E.BlastRadius = rad | |
292 | E.BlastPressure = 0 | |
293 | E.Visible = false | |
294 | E.Hit:connect(function(hit) | |
295 | if hit.Parent:FindFirstChild("Humanoid")~=nil then | |
296 | dealdmg(hit.Parent,damage,env,toim,kby,kbx) | |
297 | end | |
298 | end) | |
299 | end | |
300 | ||
301 | --Blade Hit Effect-- | |
302 | function SlashEff(pos) | |
303 | local p = Instance.new("Part",game.Workspace) | |
304 | p.Size = Vector3.new(1,1,1) | |
305 | p.BrickColor = BrickColor.new("Alder") | |
306 | p.Material = "Neon" | |
307 | p.Anchored = true | |
308 | p.CanCollide = false | |
309 | p.CFrame = pos * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
310 | local pm = Instance.new("SpecialMesh",p) | |
311 | pm.MeshType = "Sphere" | |
312 | pm.Scale = Vector3.new(.5,0,.5) | |
313 | local disp = coroutine.wrap(function() | |
314 | for i = 1, 4 do | |
315 | wait(.01) | |
316 | p.Transparency = p.Transparency + .2 | |
317 | pm.Scale = pm.Scale + Vector3.new(0,5,0) | |
318 | end | |
319 | wait(.01) | |
320 | p:Destroy() | |
321 | end) | |
322 | disp() | |
323 | end | |
324 | ||
325 | --Blade Touch-- | |
326 | dela = .5 | |
327 | bladedmg = 13 | |
328 | bladeactive = false | |
329 | function bladehit(hit) | |
330 | if bladeactive == true then | |
331 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then | |
332 | dealdmg(hit.Parent,bladedmg,1,dela,0,10) | |
333 | PlaySnd(HitSnd,hit.Parent.Head) | |
334 | SlashEff(hit.CFrame) | |
335 | end | |
336 | end | |
337 | end | |
338 | Blade.Touched:connect(bladehit) | |
339 | ||
340 | --Grab Touch-- | |
341 | weldd = nil | |
342 | exeact = false | |
343 | exed = false | |
344 | function grabhit(hit) | |
345 | if exeact == true and exed == false then | |
346 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then | |
347 | weldd = Instance.new("Weld",hit.Parent) | |
348 | weldd.Part0 = hit.Parent.Head | |
349 | weldd.Part1 = RBarrel | |
350 | exed = true | |
351 | end | |
352 | end | |
353 | end | |
354 | RBarrel.Touched:connect(grabhit) | |
355 | ||
356 | --Material Return-- | |
357 | gprop = {} | |
358 | function materialhit() | |
359 | local part = workspace:FindPartOnRay(Ray.new(chara.HumanoidRootPart.Position-Vector3.new(0,2.4,0),Vector3.new(0,-1000,0))) | |
360 | if part then | |
361 | gprop = {part.BrickColor,part.Material} | |
362 | end | |
363 | end | |
364 | ||
365 | --Clerp Animations-- | |
366 | TC = chara.HumanoidRootPart.RootJoint | |
367 | HC = chara.Torso.Neck | |
368 | RAC = chara.Torso["Right Shoulder"] | |
369 | LAC = chara.Torso["Left Shoulder"] | |
370 | RLC = chara.Torso["Right Hip"] | |
371 | LLC = chara.Torso["Left Hip"] | |
372 | TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0) | |
373 | HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0) | |
374 | RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) | |
375 | LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
376 | RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) | |
377 | LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
378 | RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
379 | LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
380 | RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
381 | LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
382 | RW = Instance.new("Weld",HC.Parent) | |
383 | RW.Part1 = HC.Parent | |
384 | RW.Part0 = chara["Right Arm"] | |
385 | RW.C0 = RWF | |
386 | LW = Instance.new("Weld",HC.Parent) | |
387 | LW.Part1 = HC.Parent | |
388 | LW.Part0 = chara["Left Arm"] | |
389 | LW.C0 = LWF | |
390 | RLW = nil | |
391 | LLW = nil | |
392 | ||
393 | function AddLegWelds() | |
394 | RLW = Instance.new("Weld",chara["Right Leg"]) | |
395 | RLW.Part1 = HC.Parent | |
396 | RLW.Part0 = chara["Right Leg"] | |
397 | RLW.C0 = RLWF | |
398 | LLW = Instance.new("Weld",chara["Left Leg"]) | |
399 | LLW.Part1 = HC.Parent | |
400 | LLW.Part0 = chara["Left Leg"] | |
401 | LLW.C0 = LLWF | |
402 | end | |
403 | ||
404 | function DestroyLegWelds() | |
405 | RLC = New("Motor6D",chara.Torso,"Right Hip",{Part0 = chara.Torso,Part1 = chara["Right Leg"],C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),}) | |
406 | LLC = New("Motor6D",chara.Torso,"Left Hip",{Part0 = chara.Torso,Part1 = chara["Left Leg"],C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),}) | |
407 | RLW:Destroy() | |
408 | LLW:Destroy() | |
409 | end | |
410 | ||
411 | function clerp(a,b,c) | |
412 | return a:lerp(b,c) | |
413 | end | |
414 | ||
415 | --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)) | |
416 | --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50)) | |
417 | --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)) | |
418 | --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2)) | |
419 | ||
420 | TC.C0 = TCF | |
421 | HC.C0 = HCF | |
422 | RW.C0 = RWF | |
423 | LW.C0 = LWF | |
424 | ||
425 | --Idle Clerp-- | |
426 | ITCF = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50)) | |
427 | IHCF = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)) | |
428 | IRWF = RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-5)) | |
429 | ILWF = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(5)) | |
430 | ||
431 | function res() | |
432 | TC.C0 = ITCF | |
433 | HC.C0 = IHCF | |
434 | RW.C0 = IRWF | |
435 | LW.C0 = ILWF | |
436 | end | |
437 | res() | |
438 | ||
439 | --Laser Slashes-- | |
440 | function LasSlash() | |
441 | del = true | |
442 | bladeactive = true | |
443 | SlashT.Enabled = true | |
444 | for i = 0,.6,.2 do | |
445 | rs:wait() | |
446 | TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.4+i) | |
447 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
448 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
449 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
450 | end | |
451 | for i = 1,5 do | |
452 | for i = 0,1,.2 do | |
453 | rs:wait() | |
454 | TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),i) | |
455 | end | |
456 | SwingSnd:Play() | |
457 | for i = 0,1,.2 do | |
458 | rs:wait() | |
459 | TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(360)),i) | |
460 | end | |
461 | SwingSnd:Play() | |
462 | end | |
463 | for i = 0,.6,.2 do | |
464 | rs:wait() | |
465 | TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.6-i) | |
466 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
467 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
468 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
469 | end | |
470 | del = false | |
471 | bladeactive = false | |
472 | SlashT.Enabled = false | |
473 | res() | |
474 | end | |
475 | ||
476 | --Grab Move-- | |
477 | function GrabMove() | |
478 | del = true | |
479 | chara.Humanoid.WalkSpeed = 0 | |
480 | exeact = true | |
481 | wait(.01) | |
482 | SwingSnd:Play() | |
483 | local bfos = Instance.new("BodyVelocity",chara.Torso) | |
484 | bfos.P = 10000 | |
485 | bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P) | |
486 | bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 500 | |
487 | debby:AddItem(bfos,.1) | |
488 | RWeld:Destroy() | |
489 | RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
490 | for i = 0,.6,.1 do | |
491 | rs:wait() | |
492 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
493 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
494 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
495 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
496 | end | |
497 | LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)) | |
498 | wait(.5) | |
499 | if exed == true then | |
500 | exeact = false | |
501 | for i = 0,.6,.1 do | |
502 | rs:wait() | |
503 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.4+i) | |
504 | LW.C0 = clerp((LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(100)),.4+i) | |
505 | end | |
506 | wait(.5) | |
507 | PlaySnd(GunFlameSnd,chara) | |
508 | PlaySnd(ExpSnd,chara) | |
509 | local hitpt = Instance.new("Part",game.Workspace) | |
510 | hitpt.Size = Vector3.new(1,1,1) | |
511 | hitpt.Anchored = true | |
512 | hitpt.CanCollide = false | |
513 | hitpt.BrickColor = BrickColor.new("New Yeller") | |
514 | hitpt.CFrame = RBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
515 | local hitb = Instance.new("Part",game.Workspace) | |
516 | hitb.Size = Vector3.new(1,1,1) | |
517 | hitb.Anchored = true | |
518 | hitb.CanCollide = false | |
519 | hitb.BrickColor = BrickColor.new("Toothpaste") | |
520 | hitb.Material = "Neon" | |
521 | hitb.CFrame = CFrame.new(hitpt.Position.x,hitpt.Position.y,hitpt.Position.z) * CFrame.fromEulerAnglesXYZ(math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30))) | |
522 | local hitbm = Instance.new("SpecialMesh",hitb) | |
523 | hitbm.MeshType = "Sphere" | |
524 | hitbm.Scale = Vector3.new(1,1,1) | |
525 | local hitm = Instance.new("SpecialMesh",hitpt) | |
526 | hitm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
527 | local hpt = coroutine.wrap(function() | |
528 | for i = 1, 9 do | |
529 | wait(.05) | |
530 | hitpt.Transparency = hitpt.Transparency + .1 | |
531 | hitm.Scale = hitm.Scale + Vector3.new(.5,.5,.5) | |
532 | hitb.Transparency = hitb.Transparency + .1 | |
533 | hitbm.Scale = hitbm.Scale + Vector3.new(.5,.5,.5) | |
534 | end | |
535 | hitpt:Destroy() | |
536 | hitb:Destroy() | |
537 | end) | |
538 | hpt() | |
539 | exed = false | |
540 | weldd:Destroy() | |
541 | ExHitbox(5,RBarrel.Position,24,2,.1,50,50) | |
542 | wait(1) | |
543 | for i = 0,.6,.1 do | |
544 | rs:wait() | |
545 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
546 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.6-i) | |
547 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-150)),.6-i) | |
548 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
549 | end | |
550 | elseif exed == false then | |
551 | exeact = false | |
552 | for i = 0,.6,.1 do | |
553 | rs:wait() | |
554 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
555 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
556 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
557 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
558 | end | |
559 | end | |
560 | RWeld:Destroy() | |
561 | RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
562 | chara.Humanoid.WalkSpeed = 20 | |
563 | del = false | |
564 | res() | |
565 | end | |
566 | ||
567 | --Shoot-- | |
568 | function Shoot() | |
569 | del = true | |
570 | RWeld:Destroy() | |
571 | RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
572 | for i = 0,.6,.1 do | |
573 | rs:wait() | |
574 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
575 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
576 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
577 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
578 | end | |
579 | LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)) | |
580 | for i = 1, 5 do | |
581 | GunFlameSnd:Play() | |
582 | local missile = Instance.new("Part",game.Workspace) | |
583 | missile.Size = Vector3.new(.4,.4,.4) | |
584 | missile.Name = "Blast" | |
585 | missile.Transparency = 1 | |
586 | missile.Position = RBarrel.Position | |
587 | missile.CFrame = RBarrel.CFrame | |
588 | missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200 | |
589 | local force = Instance.new("BodyForce") | |
590 | force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0) | |
591 | force.Parent = missile | |
592 | local p1mit = CreateTrailObj(missile,"Toothpaste","Toothpaste",0,0) | |
593 | p1mit.Enabled = true | |
594 | missile.Touched:connect(function(hit) | |
595 | if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then | |
596 | force:Destroy() | |
597 | force = nil | |
598 | missile.Anchored = true | |
599 | ExHitbox(3,missile.Position,12,1,.1,0,5) | |
600 | wait(2) | |
601 | missile:Destroy() | |
602 | end | |
603 | end) | |
604 | wait(.1) | |
605 | end | |
606 | wait(.5) | |
607 | for i = 0,.6,.1 do | |
608 | rs:wait() | |
609 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
610 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
611 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
612 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
613 | end | |
614 | RWeld:Destroy() | |
615 | RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
616 | del = false | |
617 | res() | |
618 | end | |
619 | ||
620 | --Cannon-- | |
621 | function Cannon() | |
622 | del = true | |
623 | SwingSnd:Play() | |
624 | chara.Humanoid.WalkSpeed = 5 | |
625 | for i = 0,.6,.2 do | |
626 | rs:wait() | |
627 | TC.C0 = clerp(ITCF,TCF,.4+i) | |
628 | HC.C0 = clerp(IHCF,HCF,.4+i) | |
629 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i) | |
630 | end | |
631 | SWeld:Destroy() | |
632 | SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),C1 = CFrame.new(0.381341934, 0.176781416, 0.625062943, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
633 | wait(.2) | |
634 | for i = 0,.6,.2 do | |
635 | rs:wait() | |
636 | TC.C0 = clerp(ITCF,TCF,.6-i) | |
637 | HC.C0 = clerp(IHCF,HCF,.6-i) | |
638 | RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i) | |
639 | end | |
640 | LWeld:Destroy() | |
641 | LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 4.28015164e-06, -0.707107425, -0.707106471, 6.74945295e-06, 0.707106054, -0.707107604, 1, -1.74605191e-06, 7.79910715e-06),C1 = CFrame.new(-2.09882545, -1.07468522, 0.0127067566, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
642 | for i = 0,.6,.1 do | |
643 | rs:wait() | |
644 | TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
645 | HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
646 | RW.C0 = clerp(RWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i) | |
647 | LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i) | |
648 | end | |
649 | wait(.5) | |
650 | ChargeSnd:Play() | |
651 | local hitpt = Instance.new("Part",game.Workspace) | |
652 | hitpt.Size = Vector3.new(1,1,1) | |
653 | hitpt.CanCollide = false | |
654 | hitpt.BrickColor = BrickColor.new("Toothpaste") | |
655 | hitpt.Material = "Neon" | |
656 | hitpt.Transparency = 1 | |
657 | hitpt.Position = LBarrel.Position | |
658 | local wee = Instance.new("Weld",hitpt) | |
659 | wee.Part0 = LBarrel | |
660 | wee.Part1 = hitpt | |
661 | local hitbm = Instance.new("SpecialMesh",hitpt) | |
662 | hitbm.MeshType = "Sphere" | |
663 | hitbm.Scale = Vector3.new(0,0,0) | |
664 | for i = 0, 1, .05 do | |
665 | wait(.05) | |
666 | hitpt.Transparency = 1-i | |
667 | hitbm.Scale = Vector3.new(i*2,i*2,i*2) | |
668 | local tr = coroutine.resume(coroutine.create(function() | |
669 | local hitp = Instance.new("Part",game.Workspace) | |
670 | hitp.Size = Vector3.new(1,1,1) | |
671 | hitp.Anchored = true | |
672 | hitp.CanCollide = false | |
673 | hitp.BrickColor = BrickColor.new("Toothpaste") | |
674 | hitp.Transparency = 1 | |
675 | hitp.CFrame = LBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
676 | local hitm = Instance.new("SpecialMesh",hitp) | |
677 | hitm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
678 | hitm.Scale = Vector3.new(4,4,1) | |
679 | for i = 0,1,.1 do | |
680 | wait(.05) | |
681 | hitp.Transparency = i | |
682 | hitm.Scale = Vector3.new(10-(i*10),10-(i*10),1-i) | |
683 | end | |
684 | hitp:Destroy() | |
685 | end)) | |
686 | end | |
687 | wait(1) | |
688 | hitpt:Destroy() | |
689 | local bfos = Instance.new("BodyVelocity",chara.Torso) | |
690 | bfos.P = 10000 | |
691 | bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P) | |
692 | bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * -500 | |
693 | debby:AddItem(bfos,.1) | |
694 | FlySnd:Play() | |
695 | local missile = Instance.new("Part",game.Workspace) | |
696 | missile.Size = Vector3.new(1,1,1) | |
697 | missile.Name = "Blast" | |
698 | missile.Position = LBarrel.Position | |
699 | missile.CFrame = LBarrel.CFrame | |
700 | missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200 | |
701 | missile.BrickColor = BrickColor.new("Toothpaste") | |
702 | missile.Material = "Neon" | |
703 | local force = Instance.new("BodyForce") | |
704 | force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0) | |
705 | force.Parent = missile | |
706 | local meh = Instance.new("SpecialMesh",missile) | |
707 | meh.MeshType = "Sphere" | |
708 | meh.Scale = Vector3.new(2,2,2) | |
709 | missile.Touched:connect(function(hit) | |
710 | if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then | |
711 | force:Destroy() | |
712 | force = nil | |
713 | missile.Anchored = true | |
714 | ExHitbox(50,missile.Position,60,1,.1,100,100) | |
715 | BExpSnd:Play() | |
716 | for i = 0, 1, .1 do | |
717 | local tr = coroutine.resume(coroutine.create(function() | |
718 | local hitp = Instance.new("Part",game.Workspace) | |
719 | hitp.Size = Vector3.new(1,1,1) | |
720 | hitp.Anchored = true | |
721 | hitp.CanCollide = false | |
722 | hitp.BrickColor = BrickColor.new("Toothpaste") | |
723 | hitp.Transparency = 1 | |
724 | hitp.CFrame = missile.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
725 | local hitm = Instance.new("SpecialMesh",hitp) | |
726 | hitm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
727 | hitm.Scale = Vector3.new(4,4,1) | |
728 | for i = 0,1,.01 do | |
729 | wait(.0001) | |
730 | hitp.Transparency = i | |
731 | hitm.Scale = Vector3.new(i*150,i*150,i) | |
732 | end | |
733 | hitp:Destroy() | |
734 | end)) | |
735 | end | |
736 | for i = 0,1,.01 do | |
737 | wait(.0001) | |
738 | missile.Transparency = i | |
739 | meh.Scale = Vector3.new(2+i*90,2+i*90,2+i*90) | |
740 | end | |
741 | missile:Destroy() | |
742 | end | |
743 | end) | |
744 | wait(.1) | |
745 | for i = 0,.6,.1 do | |
746 | rs:wait() | |
747 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
748 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
749 | RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i) | |
750 | LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i) | |
751 | end | |
752 | LWeld:Destroy() | |
753 | LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
754 | for i = 0,.6,.2 do | |
755 | rs:wait() | |
756 | TC.C0 = clerp(ITCF,TCF,.4+i) | |
757 | HC.C0 = clerp(IHCF,HCF,.4+i) | |
758 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i) | |
759 | end | |
760 | SWeld:Destroy() | |
761 | SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
762 | for i = 0,.6,.2 do | |
763 | rs:wait() | |
764 | TC.C0 = clerp(ITCF,TCF,.6-i) | |
765 | HC.C0 = clerp(IHCF,HCF,.6-i) | |
766 | RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i) | |
767 | end | |
768 | chara.Humanoid.WalkSpeed = 20 | |
769 | del = false | |
770 | res() | |
771 | end | |
772 | ||
773 | --Block-- | |
774 | blockval = false | |
775 | healthlock = 0 | |
776 | effeff = nil | |
777 | function ToggleBlock() | |
778 | if blockval == false then | |
779 | blockval = true | |
780 | SwingSnd:Play() | |
781 | healthlock = chara.Humanoid.Health | |
782 | effeff = Instance.new("ForceField",chara) | |
783 | effeff.Name = "FawsFeeld" | |
784 | --effeff.Visible = false | |
785 | for i = 0,.6,.1 do | |
786 | rs:wait() | |
787 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
788 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
789 | LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.4+i) | |
790 | --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.4+i) | |
791 | end | |
792 | elseif blockval == true then | |
793 | SwingSnd:Play() | |
794 | effeff:Destroy() | |
795 | blockval = false | |
796 | for i = 0,.6,.1 do | |
797 | rs:wait() | |
798 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
799 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
800 | LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.6-i) | |
801 | --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.6-i) | |
802 | end | |
803 | res() | |
804 | end | |
805 | end | |
806 | ||
807 | --Mouse Functions-- | |
808 | del = false | |
809 | combo = 0 | |
810 | function onKeyDown(key) | |
811 | if key == "q" and attacking == false then | |
812 | ToggleBlock() | |
813 | elseif del == false and blockval == false then | |
814 | if key == "z" then | |
815 | LasSlash() | |
816 | elseif key == "x" then | |
817 | GrabMove() | |
818 | elseif key == "c" then | |
819 | Shoot() | |
820 | elseif key == "v" then | |
821 | Cannon() | |
822 | end | |
823 | end | |
824 | end | |
825 | function onButton1Down() | |
826 | if del == false then | |
827 | del = true | |
828 | bladeactive = true | |
829 | SlashT.Enabled = true | |
830 | --Combo 1 | |
831 | if combo == 0 then | |
832 | wait(.001) | |
833 | for i = 0,.6,.2 do | |
834 | rs:wait() | |
835 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
836 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
837 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
838 | LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.4+i) | |
839 | end | |
840 | SwingSnd:Play() | |
841 | for i = 0,.6,.2 do | |
842 | rs:wait() | |
843 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
844 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
845 | end | |
846 | wait(.1) | |
847 | for i = 0,.6,.2 do | |
848 | rs:wait() | |
849 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
850 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
851 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
852 | LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.6-i) | |
853 | end | |
854 | combo = 1 | |
855 | --Combo 2 | |
856 | elseif combo == 1 then | |
857 | for i = 0,.6,.2 do | |
858 | rs:wait() | |
859 | TC.C0 = clerp(ITCF,TCF,.4+i) | |
860 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
861 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
862 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
863 | end | |
864 | for i = 0,1,.2 do | |
865 | rs:wait() | |
866 | TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),i) | |
867 | end | |
868 | SwingSnd:Play() | |
869 | for i = 0,1,.2 do | |
870 | rs:wait() | |
871 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(360)),i) | |
872 | end | |
873 | SwingSnd:Play() | |
874 | for i = 0,.6,.2 do | |
875 | rs:wait() | |
876 | TC.C0 = clerp(ITCF,TCF,.6-i) | |
877 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
878 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
879 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
880 | end | |
881 | combo = 2 | |
882 | --Combo 3 | |
883 | elseif combo == 2 then | |
884 | for i = 0,.6,.2 do | |
885 | rs:wait() | |
886 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
887 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
888 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i) | |
889 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i) | |
890 | end | |
891 | SWeld:Destroy() | |
892 | SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, -3.34970828e-05, -1.78813934e-07, -1.00000024, 3.96366158e-06, 1.00000024, -1.78813934e-07),C1 = CFrame.new(0.0813121796, -2.22322369, -0.174974442, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
893 | TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)) | |
894 | RW.C0 = (RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)) | |
895 | Swing2Snd:Play() | |
896 | local bfos = Instance.new("BodyVelocity",chara.Head) | |
897 | bfos.P = 20000 | |
898 | bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P) | |
899 | bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 150 | |
900 | debby:AddItem(bfos,.1) | |
901 | wait(.2) | |
902 | SWeld:Destroy() | |
903 | SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
904 | for i = 0,.6,.2 do | |
905 | rs:wait() | |
906 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
907 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
908 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i) | |
909 | LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i) | |
910 | end | |
911 | combo = 0 | |
912 | end | |
913 | del = false | |
914 | bladeactive = false | |
915 | SlashT.Enabled = false | |
916 | res() | |
917 | end | |
918 | end | |
919 | ||
920 | --Mouse Activation-- | |
921 | if Mouse then | |
922 | Mouse.KeyDown:connect(onKeyDown) | |
923 | Mouse.Button1Down:connect(onButton1Down) | |
924 | end | |
925 | ||
926 | --Loop Function-- | |
927 | walking = false | |
928 | while true do | |
929 | wait() | |
930 | materialhit() | |
931 | if del == false then attacking = false elseif del == true then attacking = true end | |
932 | if blockval == true and chara:FindFirstChild("HitByUlt")==nil then | |
933 | chara.Humanoid.Health = healthlock | |
934 | end | |
935 | torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
936 | if torvel < 1 and walking == true and del == false and attacking == false and blockval == false then | |
937 | for i = 0,1,.5 do | |
938 | rs:wait() | |
939 | if del == false and attacking == false and blockval == false then | |
940 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),ITCF,i) | |
941 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),IHCF,i) | |
942 | RW.C0 = IRWF | |
943 | LW.C0 = clerp((LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),ILWF,i) | |
944 | end | |
945 | end | |
946 | walking = false | |
947 | elseif torvel > 1 and walking == false and del == false and attacking == false and blockval == false then | |
948 | for i = 0,1,.5 do | |
949 | rs:wait() | |
950 | if del == false and attacking == false and blockval == false then | |
951 | TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i) | |
952 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),i) | |
953 | RW.C0 = IRWF | |
954 | LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),i) | |
955 | end | |
956 | end | |
957 | walking = true | |
958 | else | |
959 | end | |
960 | end |