SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | ||
87 | local h,t | |
88 | --Give the server mouse data every second frame, but only if the values changed | |
89 | --If player is not moving their mouse, client won't fire events | |
90 | local HB = game:GetService("RunService").Heartbeat | |
91 | while true do | |
92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
93 | h,t=Mouse.Hit,Mouse.Target | |
94 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
95 | end | |
96 | --Wait 2 frames | |
97 | for i=1,2 do | |
98 | HB:Wait() | |
99 | end | |
100 | end]==],script) | |
101 | ||
102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
103 | --Real game object | |
104 | local RealGame = game | |
105 | ||
106 | --Metatable for fake service | |
107 | local FakeService_Metatable = { | |
108 | __index = function(self,k) | |
109 | local s = rawget(self,"_RealService") | |
110 | if s then | |
111 | return typeof(s[k])=="function" | |
112 | and function(_,...)return s[k](s,...)end or s[k] | |
113 | end | |
114 | end, | |
115 | __newindex = function(self,k,v) | |
116 | local s = rawget(self,"_RealService") | |
117 | if s then s[k]=v end | |
118 | end | |
119 | } | |
120 | local function FakeService(t,RealService) | |
121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
122 | return setmetatable(t,FakeService_Metatable) | |
123 | end | |
124 | ||
125 | --Fake game object | |
126 | local FakeGame = { | |
127 | GetService = function(self,s) | |
128 | return rawget(self,s) or RealGame:GetService(s) | |
129 | end, | |
130 | Players = FakeService({ | |
131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
132 | },"Players"), | |
133 | UserInputService = FakeService(UIS,"UserInputService"), | |
134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
135 | RunService = FakeService({ | |
136 | _btrs = {}, | |
137 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
138 | BindToRenderStep = function(self,name,_,fun) | |
139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
140 | end, | |
141 | UnbindFromRenderStep = function(self,name) | |
142 | self._btrs[name]:Disconnect() | |
143 | end, | |
144 | },"RunService") | |
145 | } | |
146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
147 | FakeGame.service = FakeGame.GetService | |
148 | FakeService(FakeGame,game) | |
149 | --Changing owner to fake player object to support owner:GetMouse() | |
150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
151 | end | |
152 | ||
153 | ----------------------- | |
154 | --HOKUTO, NO SHINKEN!-- | |
155 | ---------------------------------------------------------------- | |
156 | --By CKbackup (Sugarie Saffron) -- | |
157 | --YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw-- | |
158 | --Discord: Sugarie Saffron#4705 -- | |
159 | ---------------------------------------------------------------- | |
160 | ||
161 | print([[ | |
162 | --Hokuto Shinken (Divine Fist of the North Star)-- | |
163 | By CKbackup (Sugarie Saffron) | |
164 | YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw | |
165 | Discord: Sugarie Saffron#4705 | |
166 | -------------------------------- | |
167 | As I've been demoted from my SB | |
168 | Mod rank in VSB, I don't see the | |
169 | need to hold this back any longer. | |
170 | ||
171 | Also, if the anims look weird or | |
172 | the weapon looks out of place, | |
173 | it's because it's actually modeled | |
174 | off a scaled rig with a package. | |
175 | It looks better with the Boy | |
176 | package. | |
177 | -------------------------------- | |
178 | (Keys) | |
179 | M - Mute/Play Music | |
180 | F - Energy Particles | |
181 | ||
182 | K/L - Change the You Wa Shock song | |
183 | to either the new/old instrumental ver. | |
184 | ||
185 | (Hold) Click - Hundred Crack Fist | |
186 | Q - Teleport | |
187 | Z - Tell those you've struck that | |
188 | they're already dead | |
189 | ]]) | |
190 | player = game.Players.LocalPlayer | |
191 | mouse = player:GetMouse() | |
192 | chara = player.Character | |
193 | equipped = false | |
194 | del = false | |
195 | attacking = false | |
196 | atkd = false | |
197 | hum = chara:FindFirstChildOfClass("Humanoid") | |
198 | debby = game.Debris | |
199 | ws = 10 | |
200 | hum.WalkSpeed = 10 | |
201 | ||
202 | ArtificialHB = Instance.new("BindableEvent", script) | |
203 | ArtificialHB.Name = "Heartbeat" | |
204 | script:WaitForChild("Heartbeat") | |
205 | frame = 0.03333333333333 | |
206 | tf = 0 | |
207 | allowframeloss = false | |
208 | tossremainder = false | |
209 | lastframe = tick() | |
210 | script.Heartbeat:Fire() | |
211 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
212 | tf = tf + s | |
213 | if tf >= frame then | |
214 | if allowframeloss then | |
215 | script.Heartbeat:Fire() | |
216 | lastframe = tick() | |
217 | else | |
218 | for i = 1, math.floor(tf / frame) do | |
219 | script.Heartbeat:Fire() | |
220 | end | |
221 | lastframe = tick() | |
222 | end | |
223 | if tossremainder then | |
224 | tf = 0 | |
225 | else | |
226 | tf = tf - frame * math.floor(tf / frame) | |
227 | end | |
228 | end | |
229 | end) | |
230 | function swait(num) | |
231 | if num == 0 or num == nil then | |
232 | ArtificialHB.Event:wait() | |
233 | else | |
234 | for i = 0, num*30 do | |
235 | ArtificialHB.Event:wait() | |
236 | end | |
237 | end | |
238 | end | |
239 | ||
240 | New = function(Object, Parent, Name, Data) | |
241 | local Object = Instance.new(Object) | |
242 | for Index, Value in pairs(Data or {}) do | |
243 | Object[Index] = Value | |
244 | end | |
245 | Object.Parent = Parent | |
246 | Object.Name = Name | |
247 | return Object | |
248 | end | |
249 | ||
250 | RightArm = New("Model",chara,"RightArm",{}) | |
251 | MainPart = New("Part",RightArm,"MainPart",{Transparency = 1,Transparency = 1,Size = Vector3.new(1, 2, 1),CFrame = CFrame.new(0.5, 3.00000787, -3.50019717, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,}) | |
252 | Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara["Right Arm"],C1 = CFrame.new(0, -1.00135803e-005, -0.000197172165, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
253 | Emit2Part = New("Part",RightArm,"Emit2Part",{BrickColor = BrickColor.new("Royal purple"),Material = Enum.Material.Neon,Transparency = 1,Transparency = 1,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(0.5, 2.10001373, -3.5001967, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(1, 0, 0.74902),}) | |
254 | Mesh = New("SpecialMesh",Emit2Part,"Mesh",{Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995),MeshType = Enum.MeshType.Sphere,}) | |
255 | Weld = New("ManualWeld",Emit2Part,"Weld",{Part0 = Emit2Part,Part1 = MainPart,C1 = CFrame.new(0, -0.899994135, 4.76837158e-007, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
256 | LeftArm = New("Model",chara,"LeftArm",{}) | |
257 | MainPart = New("Part",LeftArm,"MainPart",{Transparency = 1,Transparency = 1,Size = Vector3.new(1, 2, 1),CFrame = CFrame.new(-2.50000024, 3.00000787, -3.50019717, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,}) | |
258 | Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara["Left Arm"],C1 = CFrame.new(-2.38418579e-007, -1.00135803e-005, -0.000197172165, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
259 | EmitPart = New("Part",LeftArm,"EmitPart",{BrickColor = BrickColor.new("Royal purple"),Material = Enum.Material.Neon,Transparency = 1,Transparency = 1,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(-2.5, 2.10001373, -3.5001967, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(1, 0, 0.74902),}) | |
260 | Mesh = New("SpecialMesh",EmitPart,"Mesh",{Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995),MeshType = Enum.MeshType.Sphere,}) | |
261 | Weld = New("ManualWeld",EmitPart,"Weld",{Part0 = EmitPart,Part1 = MainPart,C1 = CFrame.new(2.38418579e-007, -0.899994135, 4.76837158e-007, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
262 | ||
263 | lach = LeftArm:GetChildren() | |
264 | rach = RightArm:GetChildren() | |
265 | ||
266 | local pemit = Instance.new("ParticleEmitter") | |
267 | pemit.Name = "beter" | |
268 | pemit.Enabled = false | |
269 | pemit.LightEmission = 1 | |
270 | pemit.Size = NumberSequence.new(1,0) | |
271 | pemit.Transparency = NumberSequence.new(0,1) | |
272 | pemit.Texture = "rbxassetid://745304849" | |
273 | pemit.Lifetime = NumberRange.new(.5) | |
274 | pemit.Acceleration = Vector3.new(0,20,0) | |
275 | pemit.Rate = 200 | |
276 | pemit.Rotation = NumberRange.new(0,360) | |
277 | pemit.Speed = NumberRange.new(2) | |
278 | pemit.RotSpeed = NumberRange.new(100) | |
279 | pemit.VelocitySpread = 100 | |
280 | pemit.ZOffset = -.5 | |
281 | ||
282 | for i, v in pairs(chara:GetChildren()) do | |
283 | if v ~= chara.HumanoidRootPart and v:IsA("BasePart") then | |
284 | pemit:Clone().Parent = v | |
285 | end | |
286 | if v:IsA("ShirtGraphic") or v:IsA("Shirt") or v:IsA("Pants") then | |
287 | v:Destroy() | |
288 | end | |
289 | if v.Name == "Chest" then | |
290 | for a, t in pairs(v:GetChildren()) do | |
291 | if t ~= v.MainPart and t ~= v.Tail then | |
292 | t:Destroy() | |
293 | end | |
294 | end | |
295 | end | |
296 | if v.Name == "FakeHeadM" then | |
297 | v.FakeHead.Normal.Texture = "http://www.roblox.com/asset/?id=1000657824" | |
298 | for a, t in pairs(v:GetChildren()) do | |
299 | if t.Name == "SpecPart" then | |
300 | t:Destroy() | |
301 | end | |
302 | end | |
303 | end | |
304 | end | |
305 | ||
306 | ShadowHead = New("Part",chara,"ShadowHeads",{BrickColor = BrickColor.new("Really black"),Size = Vector3.new(1.20000005, 0.600000024, 1),CFrame = CFrame.new(68.5999985, 0.700013041, 9.89999962, 1, 0, 0, 0, 1, 0, 0, 0, 1),Color = Color3.new(0.0666667, 0.0666667, 0.0666667),}) | |
307 | Mesh = New("SpecialMesh",ShadowHead,"Mesh",{Scale = Vector3.new(1.3, 1.5, 1.3),}) | |
308 | Weld = New("ManualWeld",ShadowHead,"Weld",{Part0 = ShadowHead,Part1 = chara.Head,C1 = CFrame.new(0, 0.200000048, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),}) | |
309 | ShadowHead.Transparency = 1 | |
310 | ||
311 | --LACM = New("CharacterMesh",chara,"LACM",{MeshId = "32328397",BodyPart = "LeftArm"}) | |
312 | --LLCM = New("CharacterMesh",chara,"LLCM",{MeshId = "319336109",BodyPart = "LeftLeg"}) | |
313 | --RACM = New("CharacterMesh",chara,"RACM",{MeshId = "32328563",BodyPart = "RightArm"}) | |
314 | --RLCM = New("CharacterMesh",chara,"RLCM",{MeshId = "319336155",BodyPart = "RightLeg"}) | |
315 | --TOCM = New("CharacterMesh",chara,"TOCM",{MeshId = "32328670",BodyPart = "Torso"}) | |
316 | ||
317 | local shi = Instance.new("Shirt",chara) | |
318 | shi.ShirtTemplate = "http://www.roblox.com/asset/?id=1188791280" | |
319 | local pan = Instance.new("Pants",chara) | |
320 | pan.PantsTemplate = "http://www.roblox.com/asset/?id=1188789468" | |
321 | local gshi = Instance.new("ShirtGraphic",nil) | |
322 | gshi.Graphic = "http://www.roblox.com/asset/?id=114844135" | |
323 | ||
324 | --Sounds-- | |
325 | function LoadSnd(id,loop,vol,pit) | |
326 | local snd = New("Sound",chara.Head,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit}) | |
327 | return snd | |
328 | end | |
329 | --AtataSnd = LoadSnd(130767866,false,1,1) | |
330 | --DeadSnd = LoadSnd(992192914,false,1,1) | |
331 | Music = LoadSnd(1072454168,true,1,1) | |
332 | Music.Parent = chara | |
333 | ||
334 | --Play Sound in Part-- | |
335 | function PlaySnd(snd,part,pitch,vol) | |
336 | local sound = Instance.new("Sound",part) | |
337 | sound.PlayOnRemove = true | |
338 | sound.SoundId = "rbxassetid://"..snd | |
339 | sound.PlaybackSpeed = pitch | |
340 | sound.Volume = vol | |
341 | sound:Destroy() | |
342 | end | |
343 | ||
344 | function CamShake(par,magni,env,dur) | |
345 | coroutine.wrap(function() | |
346 | for i=0,dur*60 do | |
347 | swait() | |
348 | hum.CameraOffset = Vector3.new(math.random(-(env*10),(env*10))/10,math.random(-(env*10),(env*10))/10,math.random(-(env*10),(env*10))/10) | |
349 | end | |
350 | hum.CameraOffset = Vector3.new(0,0,0) | |
351 | end)() | |
352 | end | |
353 | ||
354 | --function PlaySnd2(snd,part) | |
355 | --local sound = snd:Clone() | |
356 | --sound.Parent = part | |
357 | --sound.PlayOnRemove = true | |
358 | --sound:Destroy() | |
359 | --end | |
360 | ||
361 | maincol = "White" | |
362 | ||
363 | function CreateTrailObj(parent,color1,color2,ofsx,ofsz) | |
364 | local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)}) | |
365 | local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)}) | |
366 | 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}) | |
367 | return TEff | |
368 | end | |
369 | ||
370 | RPunchT = CreateTrailObj(chara["Right Arm"],"White","White",0,0) | |
371 | LPunchT = CreateTrailObj(chara["Left Arm"],"White","White",0,0) | |
372 | RKickT = CreateTrailObj(chara["Right Leg"],"White","White",0,0) | |
373 | LKickT = CreateTrailObj(chara["Left Leg"],"White","White",0,0) | |
374 | ||
375 | --Punch Hit Effect-- | |
376 | function PunchEff(pos) | |
377 | local p = Instance.new("Part",game.Workspace) | |
378 | p.Size = Vector3.new(1,1,1) | |
379 | p.BrickColor = BrickColor.new(maincol) | |
380 | p.Material = "Neon" | |
381 | p.Anchored = true | |
382 | p.CanCollide = false | |
383 | p.CFrame = pos | |
384 | CamShake(p,10,.7,.1) | |
385 | local pm = Instance.new("SpecialMesh",p) | |
386 | pm.MeshType = "Sphere" | |
387 | coroutine.resume(coroutine.create(function() | |
388 | for i = 0,1,.05 do | |
389 | swait() | |
390 | p.Transparency = i | |
391 | pm.Scale = Vector3.new(2*i,2*i,2*i) | |
392 | end | |
393 | swait() | |
394 | p:Destroy() | |
395 | end)) | |
396 | end | |
397 | function BigHitEff(pos) | |
398 | for i = 1, 5 do | |
399 | local p = Instance.new("Part",game.Workspace) | |
400 | p.Size = Vector3.new(1,1,1) | |
401 | p.BrickColor = BrickColor.new("White") | |
402 | p.Material = "Neon" | |
403 | p.Anchored = true | |
404 | p.CanCollide = false | |
405 | p.CFrame = pos * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
406 | local pm = Instance.new("SpecialMesh",p) | |
407 | pm.MeshType = "Sphere" | |
408 | pm.Scale = Vector3.new(.5,0,.5) | |
409 | local disp = coroutine.wrap(function() | |
410 | for i = 0,1,.05 do | |
411 | swait() | |
412 | p.Transparency = i | |
413 | pm.Scale = Vector3.new(2*i,2*i,2*i) | |
414 | end | |
415 | swait() | |
416 | p:Destroy() | |
417 | end) | |
418 | disp() | |
419 | local p = Instance.new("Part",game.Workspace) | |
420 | p.Size = Vector3.new(1,1,1) | |
421 | p.BrickColor = BrickColor.new("White") | |
422 | p.Material = "Neon" | |
423 | p.Anchored = true | |
424 | p.CanCollide = false | |
425 | p.CFrame = pos * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359))) | |
426 | CamShake(p,10,1,.4) | |
427 | local pm = Instance.new("SpecialMesh",p) | |
428 | pm.MeshType = "Sphere" | |
429 | pm.Scale = Vector3.new(.5,.5,.5) | |
430 | local disp = coroutine.wrap(function() | |
431 | for i = 0,1,.05 do | |
432 | swait() | |
433 | p.Transparency = i | |
434 | pm.Scale = Vector3.new(.5*i,.5*i,.5*i) | |
435 | pm.Offset = Vector3.new(0,8*i,0) | |
436 | end | |
437 | swait() | |
438 | p:Destroy() | |
439 | end) | |
440 | disp() | |
441 | end | |
442 | end | |
443 | ||
444 | --Damage Function-- | |
445 | function dealdmg(dude) | |
446 | if dude ~= chara and dude:IsDescendantOf(chara) == false then | |
447 | if dude:FindFirstChild("IsAlreadyDead") == nil then | |
448 | local vall = Instance.new("ObjectValue",dude) | |
449 | vall.Name = "IsAlreadyDead" | |
450 | local faceg = Instance.new("BillboardGui",dude) | |
451 | faceg.Name = "IsAlreadyDeadBillBoardGui" | |
452 | faceg.Size = UDim2.new(4,0,4,0) | |
453 | faceg.Adornee = dude.Head | |
454 | faceg.StudsOffset = Vector3.new(0,5.5,0) | |
455 | local simgl = Instance.new("ImageLabel",faceg) | |
456 | simgl.Position = UDim2.new(0,0,0,0) | |
457 | simgl.Size = UDim2.new(1,0,1,0) | |
458 | simgl.Image = "http://www.roblox.com/asset/?id=47110473" | |
459 | simgl.BackgroundTransparency = 1 | |
460 | end | |
461 | local vall = Instance.new("ObjectValue",dude) | |
462 | vall.Name = "IsHit" | |
463 | debby:AddItem(vall,.01) | |
464 | local bfos = Instance.new("BodyVelocity",dude.Head) | |
465 | bfos.P = 200000 | |
466 | bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P) | |
467 | bfos.Velocity = Vector3.new(0,0,0) --+ chara.HumanoidRootPart.CFrame.lookVector * kbx | |
468 | game.Debris:AddItem(bfos,.5) | |
469 | end | |
470 | end | |
471 | ||
472 | --Explode Hitbox-- | |
473 | function ExHitbox(rad,pos,damage,env,toim,kby,kbx) | |
474 | local E = Instance.new("Explosion") | |
475 | E.Position = pos | |
476 | E.Parent = game.Workspace | |
477 | E.BlastRadius = rad | |
478 | E.BlastPressure = 0 | |
479 | E.Visible = false | |
480 | E.Hit:connect(function(hit) | |
481 | if hit.Parent:FindFirstChildOfClass("Humanoid")~=nil then | |
482 | dealdmg(hit.Parent,damage,env,toim,kby,kbx) | |
483 | end | |
484 | end) | |
485 | end | |
486 | function PExHitbox() | |
487 | local E = Instance.new("Explosion",workspace) | |
488 | E.Position = chara.HumanoidRootPart.Position + chara.HumanoidRootPart.CFrame.lookVector*3 | |
489 | E.BlastRadius = 1 | |
490 | E.BlastPressure = 0 | |
491 | E.Visible = false | |
492 | debby:AddItem(E,.05) | |
493 | E.Hit:connect(function(hit) | |
494 | if hit.Parent:FindFirstChildOfClass("Humanoid")~=nil then | |
495 | if punchactive == true then | |
496 | if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil and hit.Parent.Name ~= "Salvo_Starly" then | |
497 | dealdmg(hit.Parent) | |
498 | PlaySnd(386946017,hit.Parent.Head,math.random(8,12)/10,1) | |
499 | PunchEff(hit.CFrame + Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))) | |
500 | end | |
501 | end | |
502 | if hpunchactive == true then | |
503 | if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent.Name ~= "Salvo_Starly" then | |
504 | dealdmg(hit.Parent) | |
505 | PlaySnd(200633636,hit.Parent.Head,1,1) | |
506 | BigHitEff(hit.CFrame) | |
507 | coroutine.resume(coroutine.create(function() | |
508 | if hit.Parent.Head:FindFirstChildOfClass("BodyVelocity") then | |
509 | hit.Parent.Head:FindFirstChildOfClass("BodyVelocity"):Destroy() | |
510 | end | |
511 | local bfos = Instance.new("BodyVelocity",hit.Parent.Head) | |
512 | bfos.P = 100000 | |
513 | bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P) | |
514 | bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 100 | |
515 | game.Debris:AddItem(bfos,.5) | |
516 | hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true | |
517 | swait(2) | |
518 | hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false | |
519 | end)) | |
520 | end | |
521 | end | |
522 | end | |
523 | end) | |
524 | end | |
525 | ||
526 | --Punch Touch-- | |
527 | dela = .05 | |
528 | punchactive = false | |
529 | function punchhit(hit) | |
530 | if punchactive == true then | |
531 | if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then | |
532 | dealdmg(hit.Parent) | |
533 | PlaySnd(153092227,hit.Parent.Head,1,1) | |
534 | PunchEff(hit.CFrame) | |
535 | end | |
536 | end | |
537 | end | |
538 | Emit2Part.Touched:connect(punchhit) | |
539 | EmitPart.Touched:connect(punchhit) | |
540 | ||
541 | --Chat Function-- | |
542 | function chatfunc(text,dude) | |
543 | coroutine.resume(coroutine.create(function() | |
544 | if dude:FindFirstChild("TalkingBillBoard")~= nil then | |
545 | dude:FindFirstChild("TalkingBillBoard"):destroy() | |
546 | end | |
547 | local naeeym2 = Instance.new("BillboardGui",chara) | |
548 | naeeym2.Size = UDim2.new(0,100,0,40) | |
549 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
550 | naeeym2.Adornee = dude.Head | |
551 | naeeym2.Name = "TalkingBillBoard" | |
552 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
553 | tecks2.BackgroundTransparency = 1 | |
554 | tecks2.BorderSizePixel = 0 | |
555 | tecks2.Text = "" | |
556 | tecks2.Font = "Fantasy" | |
557 | tecks2.FontSize = "Size24" | |
558 | tecks2.TextStrokeTransparency = 0 | |
559 | tecks2.TextColor3 = Color3.new(1,1,1) | |
560 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
561 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
562 | coroutine.resume(coroutine.create(function() | |
563 | for i = 1,string.len(text),1 do | |
564 | tecks2.Text = string.sub(text,1,i) | |
565 | swait(0.01) | |
566 | end | |
567 | swait(1) | |
568 | for i = 1, 5 do | |
569 | swait(.01) | |
570 | tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0) | |
571 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2 | |
572 | tecks2.TextTransparency = tecks2.TextTransparency + .2 | |
573 | end | |
574 | naeeym2:Destroy() | |
575 | end)) | |
576 | end)) | |
577 | end | |
578 | ||
579 | --function onChatted(msg) | |
580 | --chatfunc(msg,chara) | |
581 | --end | |
582 | --player.Chatted:connect(onChatted) | |
583 | ||
584 | --Clerp Animations-- | |
585 | TC = chara.HumanoidRootPart.RootJoint | |
586 | HC = chara.Torso.Neck | |
587 | RAC = chara.Torso["Right Shoulder"] | |
588 | LAC = chara.Torso["Left Shoulder"] | |
589 | RLC = chara.Torso["Right Hip"] | |
590 | LLC = chara.Torso["Left Hip"] | |
591 | TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0) | |
592 | HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0) | |
593 | RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) | |
594 | LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
595 | RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) | |
596 | LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
597 | RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
598 | LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
599 | RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
600 | LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) | |
601 | grp = Instance.new("Model",chara) | |
602 | RW = nil | |
603 | LW = nil | |
604 | RLW = nil | |
605 | LLW = nil | |
606 | ||
607 | function AddLegWelds() | |
608 | RLW = Instance.new("Weld",chara["Right Leg"]) | |
609 | RLW.Part1 = HC.Parent | |
610 | RLW.Part0 = chara["Right Leg"] | |
611 | RLW.C0 = RLWF | |
612 | LLW = Instance.new("Weld",chara["Left Leg"]) | |
613 | LLW.Part1 = HC.Parent | |
614 | LLW.Part0 = chara["Left Leg"] | |
615 | LLW.C0 = LLWF | |
616 | end | |
617 | ||
618 | function AddArmWelds() | |
619 | RW = Instance.new("Weld",HC.Parent) | |
620 | RW.Part1 = HC.Parent | |
621 | RW.Part0 = chara["Right Arm"] | |
622 | RW.C0 = RWF | |
623 | LW = Instance.new("Weld",HC.Parent) | |
624 | LW.Part1 = HC.Parent | |
625 | LW.Part0 = chara["Left Arm"] | |
626 | LW.C0 = LWF | |
627 | end | |
628 | ||
629 | function DestroyLegWelds() | |
630 | 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),}) | |
631 | 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),}) | |
632 | RLW:Destroy() | |
633 | LLW:Destroy() | |
634 | end | |
635 | ||
636 | function DestroyArmWelds() | |
637 | RAC = New("Motor6D",chara.Torso,"Right Shoulder",{Part0 = chara.Torso,Part1 = chara["Right Arm"],C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)}) | |
638 | LAC = New("Motor6D",chara.Torso,"Left Shoulder",{Part0 = chara.Torso,Part1 = chara["Left Arm"],C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)}) | |
639 | RW:Destroy() | |
640 | LW:Destroy() | |
641 | end | |
642 | ||
643 | function clerp(a,b,c) | |
644 | return a:lerp(b,c) | |
645 | end | |
646 | ||
647 | ITCF = TCF | |
648 | IHCF = HCF | |
649 | IRWF = RWF | |
650 | ILWF = LWF | |
651 | ||
652 | function res() | |
653 | TC.C0 = ITCF | |
654 | HC.C0 = IHCF | |
655 | end | |
656 | res() | |
657 | ||
658 | --Teleport-- | |
659 | function Teleport() | |
660 | PlaySnd(153613030,chara.Head,1,1) | |
661 | for i, v in pairs(chara:GetChildren()) do | |
662 | if v:IsA("BasePart") then | |
663 | local trace = Instance.new("Part",game.Workspace) | |
664 | trace.Size = v.Size | |
665 | trace.Position = v.Position | |
666 | trace.CFrame = v.CFrame | |
667 | trace.Anchored = true | |
668 | trace.CanCollide = false | |
669 | trace.BrickColor = BrickColor.new("White") | |
670 | trace.Material = "Neon" | |
671 | coroutine.resume(coroutine.create(function() | |
672 | for i = 0,1,.1 do | |
673 | swait() | |
674 | trace.Transparency = i | |
675 | end | |
676 | trace:Destroy() | |
677 | end)) | |
678 | end | |
679 | end | |
680 | chara.Torso.CFrame = mouse.Hit + Vector3.new(0,3,0) | |
681 | end | |
682 | ||
683 | --Keys-- | |
684 | holdingdown = false | |
685 | function onButton1Down() | |
686 | holdingdown = true | |
687 | if del == false then | |
688 | del = true | |
689 | AddArmWelds() | |
690 | for i = 0,.6,.1 do | |
691 | swait() | |
692 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),ITCF,.6-i) | |
693 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),IHCF,.6-i) | |
694 | RW.C0 = clerp(RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-20)),IRWF,.6-i) | |
695 | LW.C0 = clerp(LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),ILWF,.6-i) | |
696 | end | |
697 | punchactive = true | |
698 | local AtataSnd = LoadSnd(130767866,false,1,1) | |
699 | AtataSnd:Play() --PlaySnd(130767866,chara.Head,1,1) | |
700 | chatfunc("ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA",chara) | |
701 | local punches = 0 | |
702 | repeat | |
703 | swait() | |
704 | RW.C0 = (RWF + Vector3.new(math.rad(-10,10),math.random(1,2),math.random(0,1))) * CFrame.fromEulerAnglesXYZ(math.rad(-100+math.random(-15,15)),math.rad(math.random(-15,15)),math.rad(math.random(-15,15))) | |
705 | LW.C0 = (LWF + Vector3.new(math.rad(-10,10),math.random(1,2),math.random(0,1))) * CFrame.fromEulerAnglesXYZ(math.rad(-100+math.random(-15,15)),math.rad(math.random(-15,15)),math.rad(math.random(-15,15))) | |
706 | TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(math.rad(10),math.rad(math.random(-10,10)),0) | |
707 | coroutine.resume(coroutine.create(function() | |
708 | local part1 = Instance.new("Part",workspace) | |
709 | part1.Size = Vector3.new(1,2,1) | |
710 | part1.CanCollide = false | |
711 | part1.Anchored = true | |
712 | part1.BrickColor = chara["Right Arm"].BrickColor | |
713 | part1.CFrame = chara["Right Arm"].CFrame | |
714 | local part2 = Instance.new("Part",workspace) | |
715 | part2.Size = Vector3.new(1,2,1) | |
716 | part2.CanCollide = false | |
717 | part2.Anchored = true | |
718 | part2.BrickColor = chara["Left Arm"].BrickColor | |
719 | part2.CFrame = chara["Left Arm"].CFrame | |
720 | if chara:FindFirstChildOfClass("CharacterMesh") then | |
721 | local mh = Instance.new("SpecialMesh",part1) | |
722 | mh.MeshId = "rbxassetid://279174886" | |
723 | mh.Scale = Vector3.new(1.1,1.1,1.1) | |
724 | local mh = Instance.new("SpecialMesh",part2) | |
725 | mh.MeshId = "rbxassetid://279174949" | |
726 | mh.Scale = Vector3.new(1.1,1.1,1.1) | |
727 | end | |
728 | coroutine.resume(coroutine.create(function() | |
729 | for i = .4,1,.1 do | |
730 | swait() | |
731 | part1.Transparency = i | |
732 | part2.Transparency = i | |
733 | end | |
734 | part1:Destroy() | |
735 | part2:Destroy() | |
736 | end)) | |
737 | end)) | |
738 | PExHitbox() | |
739 | punches = punches + 1 | |
740 | until holdingdown == false or punches >= 230 | |
741 | punchactive = false | |
742 | LW.C0 = ILWF | |
743 | AtataSnd:Stop() | |
744 | AtataSnd.TimePosition = 7.5 | |
745 | AtataSnd:Play() | |
746 | hpunchactive = true | |
747 | chatfunc("WATAU!",chara) | |
748 | for i = 0,.6,.2 do | |
749 | swait() | |
750 | TC.C0 = clerp((TCF - Vector3.new(0,0,2)) * CFrame.fromEulerAnglesXYZ(math.rad(10),math.rad(-10),0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),math.rad(10),0),.6-i) | |
751 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),math.rad(10),0),HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),math.rad(-10),0),.6-i) | |
752 | RW.C0 = clerp((RWF + Vector3.new(0,1,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(-100),0,0),(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-100),0,0),.6-i) | |
753 | end | |
754 | PExHitbox() | |
755 | swait() | |
756 | TC.C0 = (TCF - Vector3.new(0,0,2)) * CFrame.fromEulerAnglesXYZ(math.rad(10),math.rad(-10),0) | |
757 | HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),math.rad(10),0) | |
758 | RW.C0 = (RWF + Vector3.new(0,1,1)) * CFrame.fromEulerAnglesXYZ(math.rad(-100),0,0) | |
759 | swait(.2) | |
760 | hpunchactive = false | |
761 | punchactive = false | |
762 | swait(.5) | |
763 | for i = 0,.6,.1 do | |
764 | swait() | |
765 | TC.C0 = clerp((TCF - Vector3.new(0,0,2)) * CFrame.fromEulerAnglesXYZ(math.rad(10),math.rad(-10),0),ITCF,.4+i) | |
766 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),math.rad(10),0),IHCF,.4+i) | |
767 | RW.C0 = clerp((RWF + Vector3.new(0,1,1)) * CFrame.fromEulerAnglesXYZ(math.rad(-100),0,0),IRWF,.4+i) | |
768 | LW.C0 = ILWF | |
769 | end | |
770 | DestroyArmWelds() | |
771 | walking = false | |
772 | AtataSnd.TimePosition = 0 | |
773 | debby:AddItem(AtataSnd,2) | |
774 | del = false | |
775 | end | |
776 | end | |
777 | function onButton2Down() | |
778 | if del == false then | |
779 | del = true | |
780 | AddArmWelds() | |
781 | ShadowHead.Transparency = 0 | |
782 | for i = 0,.6,.05 do | |
783 | swait() | |
784 | TC.C0 = ITCF | |
785 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),.4+i) | |
786 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0),.4+i) | |
787 | LW.C0 = ILWF | |
788 | end | |
789 | RW.C0 = (RWF + Vector3.new(0,.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0) | |
790 | local DeadSnd = LoadSnd(992192914,false,1,1) | |
791 | DeadSnd:Play() --PlaySnd(992192914,workspace,1,1) | |
792 | chatfunc("You are already dead.",chara) | |
793 | swait(2.8) | |
794 | local dudes = {} | |
795 | for i, v in pairs(workspace:GetDescendants()) do | |
796 | if v:IsA("ObjectValue") and v.Name == "IsAlreadyDead" and v.Parent:FindFirstChildOfClass("Humanoid") then | |
797 | table.insert(dudes,v.Parent) | |
798 | end | |
799 | end | |
800 | if #dudes == 0 then | |
801 | DeadSnd:Destroy() | |
802 | end | |
803 | for no = 1, #dudes do | |
804 | coroutine.resume(coroutine.create(function() | |
805 | dudes[no].IsAlreadyDead:Destroy() | |
806 | dudes[no].IsAlreadyDeadBillBoardGui:Destroy() | |
807 | if dudes[no]:FindFirstChildOfClass("Humanoid").Health > 1 then | |
808 | chatfunc("What?!",dudes[no]) | |
809 | end | |
810 | debby:AddItem(DeadSnd,6) | |
811 | swait(.5) | |
812 | for i, v in pairs(dudes[no]:GetChildren()) do | |
813 | if v:IsA("BasePart") then | |
814 | v.Anchored = true | |
815 | end | |
816 | end | |
817 | for oa = 1, 60 do | |
818 | local effp = Instance.new("Part",workspace) | |
819 | effp.CanCollide = false | |
820 | effp.BottomSurface = 0 | |
821 | effp.TopSurface = 0 | |
822 | effp.Size = Vector3.new(1,1,1) | |
823 | effp.Anchored = true | |
824 | effp.CFrame = (dudes[no].Head.CFrame * CFrame.new(0,-1.5,0)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0,359)),math.rad(math.random(0,359)),math.rad(math.random(0,359))) | |
825 | effp.Material = "Neon" | |
826 | effp.BrickColor = BrickColor.new("White") | |
827 | local efm = Instance.new("BlockMesh",effp) | |
828 | CamShake(effp,20,.4,.1) | |
829 | coroutine.resume(coroutine.create(function() | |
830 | for a = 0,1,.05 do | |
831 | efm.Scale = Vector3.new(1-a,1000*a,1-a) | |
832 | effp.Transparency = a | |
833 | swait() | |
834 | end | |
835 | effp:Destroy() | |
836 | end)) | |
837 | swait(.05) | |
838 | end | |
839 | dudes[no]:BreakJoints() | |
840 | for oa = 1, 5 do | |
841 | local effp = Instance.new("Part",workspace) | |
842 | effp.CanCollide = false | |
843 | effp.BottomSurface = 0 | |
844 | effp.TopSurface = 0 | |
845 | effp.Size = Vector3.new(1,1,1) | |
846 | effp.Anchored = true | |
847 | effp.CFrame = (dudes[no].Head.CFrame * CFrame.new(0,-1.5,0)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0,359)),math.rad(math.random(0,359)),math.rad(math.random(0,359))) | |
848 | effp.Material = "Neon" | |
849 | effp.BrickColor = BrickColor.new("White") | |
850 | local efm = Instance.new("BlockMesh",effp) | |
851 | CamShake(effp,20,1,.4) | |
852 | coroutine.resume(coroutine.create(function() | |
853 | for a = 0,1,.01 do | |
854 | efm.Scale = Vector3.new(2-a*2,1000*a,2-a*2) | |
855 | effp.Transparency = a | |
856 | swait() | |
857 | end | |
858 | effp:Destroy() | |
859 | end)) | |
860 | end | |
861 | for i, v in pairs(dudes[no]:GetChildren()) do | |
862 | if v:IsA("BasePart") then | |
863 | v.Anchored = false | |
864 | end | |
865 | end | |
866 | for a, v in pairs(dudes[no]:GetChildren()) do | |
867 | if v:IsA("BasePart") then | |
868 | local bodpos = Instance.new("BodyPosition",v) | |
869 | bodpos.Position = v.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)) | |
870 | v.BrickColor = BrickColor.new("Really white") | |
871 | v.Material = "Neon" | |
872 | end | |
873 | end | |
874 | for d = 0,1,.1 do | |
875 | for i, v in pairs(dudes[no]:GetChildren()) do | |
876 | if v:IsA("BasePart") then | |
877 | v.Transparency = d | |
878 | swait() | |
879 | end | |
880 | end | |
881 | end | |
882 | for i, v in pairs(dudes[no]:GetChildren()) do | |
883 | if v:IsA("BasePart") then | |
884 | v:Destroy() | |
885 | end | |
886 | end | |
887 | end)) | |
888 | end | |
889 | for i = 0,.6,.05 do | |
890 | swait() | |
891 | TC.C0 = ITCF | |
892 | HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),.6-i) | |
893 | RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0),.6-i) | |
894 | LW.C0 = ILWF | |
895 | end | |
896 | ShadowHead.Transparency = 1 | |
897 | DestroyArmWelds() | |
898 | walking = false | |
899 | del = false | |
900 | end | |
901 | end | |
902 | ||
903 | rage = false | |
904 | if mouse then | |
905 | mouse.Button1Down:connect(onButton1Down) | |
906 | mouse.Button1Up:connect(function() | |
907 | holdingdown = false | |
908 | end) | |
909 | mouse.KeyDown:connect(function(key) | |
910 | if key == "z" then | |
911 | onButton2Down() | |
912 | elseif key == "f" then | |
913 | if rage == false then | |
914 | for i, v in pairs(chara:GetDescendants()) do | |
915 | if v.Name == "beter" then | |
916 | v.Enabled = true | |
917 | end | |
918 | end | |
919 | rage = true | |
920 | elseif rage == true then | |
921 | for i, v in pairs(chara:GetDescendants()) do | |
922 | if v.Name == "beter" then | |
923 | v.Enabled = false | |
924 | end | |
925 | end | |
926 | rage = false | |
927 | end | |
928 | elseif key == "q" then | |
929 | Teleport() | |
930 | elseif key == "m" then | |
931 | if Music.IsPlaying == true then | |
932 | Music:Stop() | |
933 | elseif Music.IsPlaying == false then | |
934 | Music:Play() | |
935 | end | |
936 | elseif key == "k" then | |
937 | Music.SoundId = "rbxassetid://548642448" | |
938 | elseif key == "l" then | |
939 | Music.SoundId = "rbxassetid://1072454168" | |
940 | end | |
941 | end) | |
942 | --mouse.KeyUp:connect(onKeyUp) | |
943 | end | |
944 | ||
945 | --Loop Function-- | |
946 | walking = false | |
947 | toim = 0 | |
948 | while true do | |
949 | swait() | |
950 | hum.Name = "hoomanood" | |
951 | hum.Health = math.huge | |
952 | hum.MaxHealth = math.huge | |
953 | --if gkeydown == true then | |
954 | --coroutine.resume(coroutine.create(function() | |
955 | --onButton1Down() | |
956 | --end)) | |
957 | --end | |
958 | toim = toim + .1 | |
959 | if del == false then attacking = false elseif del == true then attacking = true end | |
960 | torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
961 | if torvel < 1 and walking == true and del == false and atkd == false and attacking == false then | |
962 | for i = 0,1,.25 do | |
963 | swait() | |
964 | if del == false and attacking == false then | |
965 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),ITCF,i) | |
966 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),IHCF,i) | |
967 | --RW.C0 = IRWF | |
968 | --LW.C0 = IRWF | |
969 | end | |
970 | end | |
971 | walking = false | |
972 | elseif torvel > 1 and walking == false and del == false and atkd == false and attacking == false then | |
973 | for i = 0,1,.25 do | |
974 | swait() | |
975 | if del == false and attacking == false then | |
976 | TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),ITCF,1-i) | |
977 | HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),IHCF,1-i) | |
978 | --RW.C0 = IRWF | |
979 | --LW.C0 = ILWF | |
980 | end | |
981 | end | |
982 | walking = true | |
983 | else | |
984 | end | |
985 | end |