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,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end | |
6 | ||
7 | wait(1) | |
8 | ||
9 | --[[screw bumper cars now we have... | |
10 | ||
11 | ||
12 | ||
13 | ||
14 | A REAL FUCKING CAR HOLY SHIT!!!!1!1]]-- | |
15 | ||
16 | maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name | |
17 | secondcolor = "Really black" | |
18 | ||
19 | wait(1 / 60) | |
20 | Effects = { } | |
21 | local Player = game.Players.localPlayer | |
22 | local Character = Player.Character | |
23 | local Humanoid = Character:FindFirstChildOfClass("Humanoid") | |
24 | local mouse = Player:GetMouse() | |
25 | local LeftArm = Character["Left Arm"] | |
26 | local RightArm = Character["Right Arm"] | |
27 | local LeftLeg = Character["Left Leg"] | |
28 | local RightLeg = Character["Right Leg"] | |
29 | local Head = Character.Head | |
30 | local Torso = Character.Torso | |
31 | local cam = game.Workspace.CurrentCamera | |
32 | local RootPart = Character.HumanoidRootPart | |
33 | local RootJoint = RootPart.RootJoint | |
34 | local equipped = true | |
35 | local attack = false | |
36 | local Anim = 'Idle' | |
37 | local idle = 0 | |
38 | local attacktype = 1 | |
39 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
40 | local velocity = RootPart.Velocity.y | |
41 | local sine = 0 | |
42 | local change = 1 | |
43 | local grabbed = false | |
44 | local cn = CFrame.new | |
45 | local mr = math.rad | |
46 | local angles = CFrame.Angles | |
47 | local ud = UDim2.new | |
48 | local c3 = Color3.new | |
49 | local dir = {w = 0, s = 0, a = 0, d = 0} | |
50 | Climbanim = false | |
51 | Runkey=false | |
52 | firemode = false | |
53 | inair = false | |
54 | blocking=false | |
55 | humHsave=0 | |
56 | humDsave=0 | |
57 | extralock=true | |
58 | lasthit = nil | |
59 | IKM = false | |
60 | ff = Instance.new("ForceField", game.Players.LocalPlayer.Character) | |
61 | ff.Visible = false | |
62 | HMDX = Humanoid.MoveDirection.X/3 | |
63 | HMDZ = Humanoid.MoveDirection.Z/3 | |
64 | local ColorsArray = {ColorSequenceKeypoint.new(0, Color3.new(0,1,1)), | |
65 | ColorSequenceKeypoint.new(0.16, Color3.new(0,1,1)), | |
66 | ColorSequenceKeypoint.new(0.32, Color3.new(0,1,1)), | |
67 | ColorSequenceKeypoint.new(0.48, Color3.new(0.5,0,1)), | |
68 | ColorSequenceKeypoint.new(0.64, Color3.new(0.5,0,1)), | |
69 | ColorSequenceKeypoint.new(0.80, Color3.new(0.5,0,1)), | |
70 | ColorSequenceKeypoint.new(0.96, Color3.new(0.5,0,1)), | |
71 | ColorSequenceKeypoint.new(1, Color3.new(0.5,0,1))} | |
72 | local s = Instance.new("Sound",Character) | |
73 | s.Name = "BumperCarSound" | |
74 | s.SoundId = "http://www.roblox.com/asset/?id=532147820" | |
75 | s.Pitch = .7 | |
76 | s.Volume = 5 | |
77 | s.Looped = true | |
78 | s.archivable = false | |
79 | s.Parent = Character | |
80 | s:play() | |
81 | local airtime = Instance.new("Sound",Character) | |
82 | airtime.Name = "airtime" | |
83 | airtime.SoundId = "http://www.roblox.com/asset/?id=892076107" | |
84 | airtime.Volume = 5 | |
85 | airtime.archivable = false | |
86 | airtime.Parent = Character | |
87 | sflon = true | |
88 | bg2 = Instance.new("BodyGyro", game.Players.LocalPlayer.Character.HumanoidRootPart) | |
89 | game:GetService("RunService"):BindToRenderStep("ew", 0, function() | |
90 | if attack == true then | |
91 | bg2.D = 0 | |
92 | bg2.P = 0 | |
93 | bg2.maxTorque = Vector3.new(0,0,0) | |
94 | end | |
95 | if attack == false then | |
96 | bg2.D = 100 | |
97 | bg2.P = 9999 | |
98 | bg2.maxTorque = Vector3.new(1e+005,1e+000,1e+005)*math.huge | |
99 | bg2.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position ,Vector3.new(game.Workspace.CurrentCamera.CoordinateFrame.p.x,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.y,game.Workspace.CurrentCamera.CoordinateFrame.p.z)) * CFrame.Angles(0,math.rad(180),0) | |
100 | ||
101 | end | |
102 | end)--]] | |
103 | ||
104 | New = function(Object, Parent, Name, Data) | |
105 | local Object = Instance.new(Object) | |
106 | for Index, Value in pairs(Data or {}) do | |
107 | Object[Index] = Value | |
108 | end | |
109 | Object.Parent = Parent | |
110 | Object.Name = Name | |
111 | return Object | |
112 | end | |
113 | ||
114 | BumperCar = New("Model",Workspace,"BumperCar",{}) | |
115 | SwHandle = New("Part",BumperCar,"Handle",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.Metal,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 7.55000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.5,0.5,0.5),}) | |
116 | Part = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.Metal,Size = Vector3.new(1.359, 0.416, 13.38),CFrame = CFrame.new(-5.16500664, 7.55000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.7,0.7,0.7),}) | |
117 | wheel = New("Part",BumperCar,"wheels",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.DiamondPlate,Size = Vector3.new(6.5, 0.7, 6.5),CFrame = CFrame.new(-5.16500664, 8.15000019, -36.9631157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0,0,0),}) | |
118 | wheel2 = New("Part",BumperCar,"idk",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.DiamondPlate,Size = Vector3.new(6.5, 0.7, 6.5),CFrame = CFrame.new(-5.16500664, 6.98000019, -36.9631157, 1, 0, 0, 0, 1, 0, 90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0,0,0),}) | |
119 | body = New("Part",BumperCar,"car",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.Metal,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 9.75000019, -36.9631157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0,0,1),}) | |
120 | glass = New("Part",BumperCar,"glass",{BrickColor = BrickColor.new("Pastel light blue"),Material = Enum.Material.Glass,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.18500664, 10.45000019, -35.7631157, 0.001, 0, 0, 0, 1, 0, 90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Transparency = 0.5,}) | |
121 | inside = New("Part",BumperCar,"inside",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.Metal,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 8.75000019, -36.9631157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.5,0.5,0.5),}) | |
122 | grille = New("Part",BumperCar,"grille",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.DiamondPlate,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 9.55000019, -29.9631157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.1,0.1,0.1),}) | |
123 | plate = New("Part",BumperCar,"plate",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.DiamondPlate,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 9.55000019, -44.7851157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1,1,1),}) | |
124 | rl = New("Part",BumperCar,"rl",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.Neon,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.06500664, 9.45000019, -44.1751157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1,0,0),}) | |
125 | hl = New("Part",BumperCar,"hl",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.Neon,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 9.55000019, -29.9651157, 1, 0, 0, 0, 1, 0, -90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1,1,1),}) | |
126 | ep = New("Part",BumperCar,"idk",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.DiamondPlate,Size = Vector3.new(18, 0.7, 6.5),CFrame = CFrame.new(-5.16500664, 12.98000019, -36.9631157, 1, 0, 0, 0, 1, 0, 90, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0,0,0),}) | |
127 | hitbox = New("Part",BumperCar,"hitbox",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.Metal,Size = Vector3.new(6.5, 0.53, 16),CFrame = CFrame.new(-5.16500664, 10.05000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.5,0.5,0.5),}) | |
128 | hitbox2 = New("Part",BumperCar,"hitbox2",{BrickColor = BrickColor.new("Really Blue"),Material = Enum.Material.Metal,Size = Vector3.new(6.5, 0.53, 6.5),CFrame = CFrame.new(-5.16500664, 11.55000019, -36.9631157, 1, 0, 0, 0, 1, 0, 0, 0, 1),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.5,0.5,0.5),}) | |
129 | ||
130 | FrontPart = New("Part",BumperCar,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(6, 6, 6),CFrame = CFrame.new(-5.16500664, 7.55000019, -31.9631157, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 0.999999821),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),Transparency = 1,}) | |
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 | ||
143 | local mesh2 = Instance.new("FileMesh") | |
144 | mesh2.Parent = body | |
145 | mesh2.MeshId = "rbxassetid://1432737948" | |
146 | local mesh = Instance.new("FileMesh") | |
147 | mesh.Parent = wheel | |
148 | mesh.MeshId = "rbxassetid://1432629613" | |
149 | local mesh3 = Instance.new("FileMesh") | |
150 | mesh3.Parent = glass | |
151 | mesh3.MeshId = "rbxassetid://1432810983" | |
152 | local mesh4 = Instance.new("FileMesh") | |
153 | mesh4.Parent = inside | |
154 | mesh4.MeshId = "rbxassetid://1432877497" | |
155 | local mesh5 = Instance.new("FileMesh") | |
156 | mesh5.Parent = grille | |
157 | mesh5.MeshId = "rbxassetid://1432898984" | |
158 | local mesh6 = Instance.new("FileMesh") | |
159 | mesh6.Parent = plate | |
160 | mesh6.MeshId = "rbxassetid://1432917470" | |
161 | local mesh7 = Instance.new("FileMesh") | |
162 | mesh7.Parent = rl | |
163 | mesh7.MeshId = "rbxassetid://1432942116" | |
164 | local mesh8 = Instance.new("FileMesh") | |
165 | mesh8.Parent = hl | |
166 | mesh8.MeshId = "rbxassetid://1432958104" | |
167 | local Light = Instance.new("SpotLight",hl) | |
168 | Light.Angle = 90; | |
169 | Light.Brightness = 100; | |
170 | Light.Face = Enum.NormalId.Left; | |
171 | Light.Range = 30; | |
172 | local lt2 = Instance.new('PointLight',rl) | |
173 | lt2.Range = 8 | |
174 | lt2.Brightness = 100 | |
175 | lt2.Color = Color3.new(1,0,0) | |
176 | lt2.Enabled = true | |
177 | lt2.Shadows = true | |
178 | ep.Transparency = 1 | |
179 | particle = Instance.new("ParticleEmitter",ep) | |
180 | particle.Enabled = false | |
181 | particle.EmissionDirection = "Bottom" | |
182 | particle.Lifetime = NumberRange.new(2.5,2.501) | |
183 | particle.Rate = 1500 | |
184 | particle.Texture = "rbxassetid://241629053" | |
185 | particle.Color = ColorSequence.new(Color3.new(0,0,1)) | |
186 | ||
187 | particle.Size = NumberSequence.new(1.4,1.41) | |
188 | local all,last = {} | |
189 | function scan(p) | |
190 | for _,v in pairs(p:GetChildren()) do | |
191 | if (v:IsA("BasePart")) then | |
192 | if (last) then | |
193 | local w = Instance.new("Weld") | |
194 | w.Part0,w.Part1 = last,v | |
195 | w.C0 = v.CFrame:toObjectSpace(last.CFrame):inverse() | |
196 | w.Parent = last | |
197 | end | |
198 | table.insert(all,v) | |
199 | last = v | |
200 | end | |
201 | scan(v) | |
202 | end | |
203 | end | |
204 | scan(BumperCar) | |
205 | ||
206 | ||
207 | for _,v in pairs(all) do v.Anchored = false v.CanCollide = false end | |
208 | wheel2.Transparency = 1 | |
209 | wheel2.CanCollide = true | |
210 | hitbox.CanCollide = true | |
211 | hitbox.Transparency = 1 | |
212 | hitbox2.CanCollide = true | |
213 | hitbox2.Transparency = 1 | |
214 | BumperCar.Parent = Character | |
215 | ||
216 | local Services = { | |
217 | ||
218 | ||
219 | SoundService = game:GetService("SoundService"); | |
220 | Players = game:GetService("Players"); | |
221 | Debris = game:GetService("Debris"); | |
222 | Workspace = game:GetService("Workspace"); | |
223 | Lighting = game:GetService("Lighting"); | |
224 | HttpService = game:GetService("HttpService"); | |
225 | InsertService = game:GetService("InsertService"); | |
226 | ||
227 | } | |
228 | ||
229 | local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
230 | Humanoid.Animator:Destroy() | |
231 | Character.Animate:Destroy() | |
232 | ||
233 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
234 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
235 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
236 | ||
237 | ||
238 | ||
239 | SWW = Instance.new("Weld") | |
240 | SWW.Name = "SWW" | |
241 | SWW.Part0 = Torso | |
242 | SWW.C0 = cn(0, -2.6, -1)*angles(math.rad(-0),math.rad(-180),math.rad(0)) | |
243 | SWW.C1 = cn(0, 0, 0) | |
244 | SWW.Part1 = SwHandle | |
245 | SWW.Parent = Torso | |
246 | ||
247 | RSH, LSH = nil, nil | |
248 | ||
249 | RW = Instance.new("Weld") | |
250 | LW = Instance.new("Weld") | |
251 | ||
252 | RH = Torso["Right Hip"] | |
253 | LH = Torso["Left Hip"] | |
254 | ||
255 | RSH = Torso["Right Shoulder"] | |
256 | LSH = Torso["Left Shoulder"] | |
257 | ||
258 | RSH.Parent = nil | |
259 | LSH.Parent = nil | |
260 | ||
261 | RW.Name = "RW" | |
262 | RW.Part0 = Torso | |
263 | RW.C0 = cn(1.5, 0.5, 0) | |
264 | RW.C1 = cn(0, 0.5, 0) | |
265 | RW.Part1 = RightArm | |
266 | RW.Parent = Torso | |
267 | ||
268 | LW.Name = "LW" | |
269 | LW.Part0 = Torso | |
270 | LW.C0 = cn(-1.5, 0.5, 0) | |
271 | LW.C1 = cn(0, 0.5, 0) | |
272 | LW.Part1 = LeftArm | |
273 | LW.Parent = Torso | |
274 | ||
275 | function clerp(a, b, t) | |
276 | local qa = { | |
277 | QuaternionFromCFrame(a) | |
278 | } | |
279 | local qb = { | |
280 | QuaternionFromCFrame(b) | |
281 | } | |
282 | local ax, ay, az = a.x, a.y, a.z | |
283 | local bx, by, bz = b.x, b.y, b.z | |
284 | local _t = 1 - t | |
285 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
286 | end | |
287 | ||
288 | function QuaternionFromCFrame(cf) | |
289 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
290 | local trace = m00 + m11 + m22 | |
291 | if trace > 0 then | |
292 | local s = math.sqrt(1 + trace) | |
293 | local recip = 0.5 / s | |
294 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
295 | else | |
296 | local i = 0 | |
297 | if m11 > m00 then | |
298 | i = 1 | |
299 | end | |
300 | if m22 > (i == 0 and m00 or m11) then | |
301 | i = 2 | |
302 | end | |
303 | if i == 0 then | |
304 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
305 | local recip = 0.5 / s | |
306 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
307 | elseif i == 1 then | |
308 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
309 | local recip = 0.5 / s | |
310 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
311 | elseif i == 2 then | |
312 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
313 | local recip = 0.5 / s | |
314 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
315 | end | |
316 | end | |
317 | end | |
318 | ||
319 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
320 | local xs, ys, zs = x + x, y + y, z + z | |
321 | local wx, wy, wz = w * xs, w * ys, w * zs | |
322 | local xx = x * xs | |
323 | local xy = x * ys | |
324 | local xz = x * zs | |
325 | local yy = y * ys | |
326 | local yz = y * zs | |
327 | local zz = z * zs | |
328 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
329 | end | |
330 | ||
331 | function QuaternionSlerp(a, b, t) | |
332 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
333 | local startInterp, finishInterp; | |
334 | if cosTheta >= 0.0001 then | |
335 | if (1 - cosTheta) > 0.0001 then | |
336 | local theta = math.acos(cosTheta) | |
337 | local invSinTheta = 1 / math.sin(theta) | |
338 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
339 | finishInterp = math.sin(t * theta) * invSinTheta | |
340 | else | |
341 | startInterp = 1 - t | |
342 | finishInterp = t | |
343 | end | |
344 | else | |
345 | if (1 + cosTheta) > 0.0001 then | |
346 | local theta = math.acos(-cosTheta) | |
347 | local invSinTheta = 1 / math.sin(theta) | |
348 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
349 | finishInterp = math.sin(t * theta) * invSinTheta | |
350 | else | |
351 | startInterp = t - 1 | |
352 | finishInterp = t | |
353 | end | |
354 | end | |
355 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
356 | end | |
357 | ||
358 | function swait(num) | |
359 | if num == 0 or num == nil then | |
360 | game:service'RunService'.RenderStepped:wait(0) | |
361 | else | |
362 | for i = 0, num do | |
363 | game:service'RunService'.RenderStepped:wait(0) | |
364 | end | |
365 | end | |
366 | end | |
367 | ||
368 | local RbxUtility = LoadLibrary("RbxUtility") | |
369 | local Create = RbxUtility.Create | |
370 | ||
371 | function RemoveOutlines(part) | |
372 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
373 | end | |
374 | ||
375 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
376 | local Part = Create("Part"){ | |
377 | formFactor = FormFactor, | |
378 | Parent = Parent, | |
379 | Reflectance = Reflectance, | |
380 | Transparency = Transparency, | |
381 | CanCollide = false, | |
382 | Locked = true, | |
383 | BrickColor = BrickColor.new(tostring(BColor)), | |
384 | Name = Name, | |
385 | Size = Size, | |
386 | Material = Material, | |
387 | } | |
388 | RemoveOutlines(Part) | |
389 | return Part | |
390 | end | |
391 | ||
392 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
393 | local Msh = Create(Mesh){ | |
394 | Parent = Part, | |
395 | Offset = OffSet, | |
396 | Scale = Scale, | |
397 | } | |
398 | if Mesh == "SpecialMesh" then | |
399 | Msh.MeshType = MeshType | |
400 | Msh.MeshId = MeshId | |
401 | end | |
402 | return Msh | |
403 | end | |
404 | ||
405 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
406 | local Weld = Create("Weld"){ | |
407 | Parent = Parent, | |
408 | Part0 = Part0, | |
409 | Part1 = Part1, | |
410 | C0 = C0, | |
411 | C1 = C1, | |
412 | } | |
413 | return Weld | |
414 | end | |
415 | ||
416 | function rayCast(Position, Direction, Range, Ignore) | |
417 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
418 | end | |
419 | ||
420 | function CreateSound(id, par, vol, pit) | |
421 | coroutine.resume(coroutine.create(function() | |
422 | local sou = Instance.new("Sound", par or workspace) | |
423 | sou.Volume = vol | |
424 | sou.Pitch = pit or 1 | |
425 | sou.SoundId = id | |
426 | wait() | |
427 | sou:play() | |
428 | game:GetService("Debris"):AddItem(sou, 6) | |
429 | end)) | |
430 | end | |
431 | function CreateSong(id, par, vol, pit) | |
432 | coroutine.resume(coroutine.create(function() | |
433 | sou2 = Instance.new("Sound", par or workspace) | |
434 | sou2.Volume = vol | |
435 | sou2.Pitch = 1 | |
436 | sou2.SoundId = id | |
437 | wait() | |
438 | sou2:play() | |
439 | sou2.Looped = true | |
440 | end)) | |
441 | end | |
442 | ||
443 | local function getclosest(obj, distance) | |
444 | local last, lastx = distance + 1 | |
445 | for i, v in pairs(workspace:GetChildren()) do | |
446 | if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then | |
447 | local t = v.Torso | |
448 | local dist = (t.Position - obj.Position).magnitude | |
449 | if dist <= distance then | |
450 | if dist < last then | |
451 | last = dist | |
452 | lastx = v | |
453 | end | |
454 | end | |
455 | end | |
456 | end | |
457 | return lastx | |
458 | end | |
459 | ||
460 | function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch) | |
461 | for i, v in pairs(hit:GetChildren()) do | |
462 | if v:IsA("Humanoid") and hit.Name ~= Character.Name then | |
463 | local find = v:FindFirstChild("Hitz") | |
464 | if not find then | |
465 | if v.Parent:findFirstChild("Head") then | |
466 | local BillG = Create("BillboardGui"){ | |
467 | Parent = v.Parent.Head, | |
468 | Size = UDim2.new(1, 0, 1, 0), | |
469 | Adornee = v.Parent.Head, | |
470 | StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)), | |
471 | } | |
472 | local TL = Create("TextLabel"){ | |
473 | Parent = BillG, | |
474 | Size = UDim2.new(3, 3, 3, 3), | |
475 | BackgroundTransparency = 1, | |
476 | Text = tostring(damage).."-", | |
477 | TextColor3 = Color1.Color, | |
478 | TextStrokeColor3 = Color2.Color, | |
479 | TextStrokeTransparency = 0, | |
480 | TextXAlignment = Enum.TextXAlignment.Center, | |
481 | TextYAlignment = Enum.TextYAlignment.Center, | |
482 | FontSize = Enum.FontSize.Size18, | |
483 | Font = "ArialBold", | |
484 | } | |
485 | coroutine.resume(coroutine.create(function() | |
486 | wait(1) | |
487 | for i = 0, 1, .1 do | |
488 | wait(.1) | |
489 | BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0) | |
490 | end | |
491 | BillG:Destroy() | |
492 | end)) | |
493 | end | |
494 | v.Health = v.Health - damage | |
495 | local bool = Create("BoolValue"){ | |
496 | Parent = v, | |
497 | Name = 'Hitz', | |
498 | } | |
499 | if HSound ~= nil and HPitch ~= nil then | |
500 | CreateSound(HSound, hit, 1, HPitch) | |
501 | end | |
502 | game:GetService("Debris"):AddItem(bool, cooldown) | |
503 | end | |
504 | end | |
505 | end | |
506 | end | |
507 | ||
508 | ||
509 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
510 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
511 | prt.Anchored = true | |
512 | prt.CFrame = cframe | |
513 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
514 | game:GetService("Debris"):AddItem(prt, 10) | |
515 | if Type == 1 or Type == nil then | |
516 | table.insert(Effects, { | |
517 | prt, | |
518 | "Block1", | |
519 | delay, | |
520 | x3, | |
521 | y3, | |
522 | z3, | |
523 | msh | |
524 | }) | |
525 | elseif Type == 2 then | |
526 | table.insert(Effects, { | |
527 | prt, | |
528 | "Block2", | |
529 | delay, | |
530 | x3, | |
531 | y3, | |
532 | z3, | |
533 | msh | |
534 | }) | |
535 | elseif Type == 3 then | |
536 | table.insert(Effects, { | |
537 | prt, | |
538 | "Block3", | |
539 | delay, | |
540 | x3, | |
541 | y3, | |
542 | z3, | |
543 | msh | |
544 | }) | |
545 | end | |
546 | end | |
547 | ||
548 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
549 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
550 | prt.Anchored = true | |
551 | prt.CFrame = cframe | |
552 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
553 | game:GetService("Debris"):AddItem(prt, 10) | |
554 | table.insert(Effects, { | |
555 | prt, | |
556 | "Cylinder", | |
557 | delay, | |
558 | x3, | |
559 | y3, | |
560 | z3, | |
561 | msh | |
562 | }) | |
563 | end | |
564 | ||
565 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
566 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
567 | prt.Anchored = true | |
568 | prt.CFrame = cframe * CFrame.new(x1, y1, z1) | |
569 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
570 | game:GetService("Debris"):AddItem(prt, 10) | |
571 | table.insert(Effects, { | |
572 | prt, | |
573 | "Cylinder", | |
574 | delay, | |
575 | x3, | |
576 | y3, | |
577 | z3, | |
578 | msh | |
579 | }) | |
580 | end | |
581 | ||
582 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
583 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
584 | prt.Anchored = true | |
585 | prt.CFrame = cframe | |
586 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
587 | game:GetService("Debris"):AddItem(prt, 10) | |
588 | table.insert(Effects, { | |
589 | prt, | |
590 | "Cylinder", | |
591 | delay, | |
592 | x3, | |
593 | y3, | |
594 | z3, | |
595 | msh | |
596 | }) | |
597 | end | |
598 | ||
599 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
600 | local prt = CreatePart(3, workspace,"Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
601 | prt.Anchored = true | |
602 | prt.CFrame = cframe | |
603 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
604 | game:GetService("Debris"):AddItem(prt, 10) | |
605 | table.insert(Effects, { | |
606 | prt, | |
607 | "Cylinder", | |
608 | delay, | |
609 | x3, | |
610 | y3, | |
611 | z3, | |
612 | msh | |
613 | }) | |
614 | end | |
615 | ||
616 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
617 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
618 | prt.Anchored = true | |
619 | prt.CFrame = cframe | |
620 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
621 | game:GetService("Debris"):AddItem(prt, 10) | |
622 | table.insert(Effects, { | |
623 | prt, | |
624 | "Cylinder", | |
625 | delay, | |
626 | x3, | |
627 | y3, | |
628 | z3, | |
629 | msh | |
630 | }) | |
631 | end | |
632 | ||
633 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
634 | local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
635 | prt.Anchored = true | |
636 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
637 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
638 | local num = math.random(10, 50) / 1000 | |
639 | game:GetService("Debris"):AddItem(prt, 10) | |
640 | table.insert(Effects, { | |
641 | prt, | |
642 | "Shatter", | |
643 | num, | |
644 | prt.CFrame, | |
645 | math.random() - math.random(), | |
646 | 0, | |
647 | math.random(50, 100) / 100 | |
648 | }) | |
649 | end | |
650 | ||
651 | ||
652 | ||
653 | ||
654 | for i = 0, 1, 0.05 do | |
655 | swait() | |
656 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
657 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
658 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
659 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3) | |
660 | if Torsovelocity > 2 then | |
661 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2) | |
662 | RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
663 | LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
664 | elseif Torsovelocity < 1 then | |
665 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
666 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
667 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
668 | end | |
669 | end | |
670 | attack = false | |
671 | ||
672 | ||
673 | ||
674 | game:GetService'RunService'.Stepped:connect(function() | |
675 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
676 | velocity = RootPart.Velocity.y | |
677 | sine = sine + change | |
678 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
679 | if equipped == true or equipped == false then | |
680 | if RootPart.Velocity.y > -1 and hit == nil then | |
681 | Anim = "Jump" | |
682 | inair = true | |
683 | ||
684 | if attack == false then | |
685 | s.Pitch = 1 | |
686 | s.Volume = 5 | |
687 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(15), math.rad(0), math.rad(0)), .1) | |
688 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
689 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-15)), 0.1) | |
690 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(15)), 0.1) | |
691 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
692 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
693 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
694 | end | |
695 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
696 | Anim = "Fall" | |
697 | inair = true | |
698 | ||
699 | if attack == false then | |
700 | s.Pitch = .7 | |
701 | s.Volume = 5 | |
702 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
703 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
704 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(45)), 0.05) | |
705 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(180 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-45)), 0.05) | |
706 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
707 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
708 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
709 | end | |
710 | elseif Torsovelocity < 1 and hit ~= nil then | |
711 | Anim = "Idle" | |
712 | ||
713 | inair = false | |
714 | if attack == false then | |
715 | s.Pitch = .7 | |
716 | s.Volume = 5 | |
717 | change = 0.8 | |
718 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
719 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
720 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
721 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
722 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
723 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
724 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
725 | end --]] | |
726 | ||
727 | elseif Torsovelocity > 1 and hit ~= nil then | |
728 | Anim = "Walk" | |
729 | inair = false | |
730 | ||
731 | if attack == false and Runkey == true then | |
732 | s.Pitch = 1.2 | |
733 | s.Volume = 5 | |
734 | ||
735 | change = 1 | |
736 | Humanoid.WalkSpeed = 60 | |
737 | Humanoid.JumpPower = 105 | |
738 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(-45), math.rad(0) + RootPart.RotVelocity.Y/40, math.rad(2 * math.cos(sine / 1))), .4) | |
739 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(35 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .2) | |
740 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(25 - 1 * math.cos(sine / 4)), math.rad(0), math.rad(-45)), 0.2) | |
741 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(25 + 1 * math.cos(sine / 4)), math.rad(0), math.rad(45)), 0.2) | |
742 | RH.C0 = clerp(RH.C0, cn(.6, -1, 0) * RHCF * angles(math.rad(6), math.rad(0), math.rad(45 + .05 * math.cos(sine / 25))), .4) | |
743 | LH.C0 = clerp(LH.C0, cn(-.6, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-45 + .05 * math.cos(sine / 25))), .4) | |
744 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1,1) * angles(math.rad(-45),math.rad(-180),math.rad(0)), 0.4) | |
745 | end | |
746 | if attack == false and Runkey == false then | |
747 | s.Pitch = .8 | |
748 | s.Volume = 5 | |
749 | change = 0.65 | |
750 | Humanoid.WalkSpeed = 30 | |
751 | Humanoid.JumpPower = 50 | |
752 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(.5 * math.cos(sine / 1))), .3) | |
753 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0) + RootPart.RotVelocity.Y/20), .1) | |
754 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
755 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
756 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
757 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
758 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
759 | end | |
760 | ||
761 | function onClimbing(speed) | |
762 | if attack == false then | |
763 | attack = true | |
764 | Climbanim= true | |
765 | Humanoid.WalkSpeed = 14 | |
766 | while Climbanim == true do | |
767 | for i = 0, 0, 0.1 do | |
768 | swait() | |
769 | ||
770 | change = 0.5 | |
771 | ||
772 | ||
773 | ||
774 | if RootPart.Velocity.y > .01 then | |
775 | s.Pitch = .9 | |
776 | s.Volume = 5 | |
777 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .3) | |
778 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
779 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
780 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
781 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
782 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
783 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
784 | end | |
785 | ||
786 | ||
787 | ||
788 | ||
789 | if RootPart.Velocity.y < .5 and RootPart.Velocity.y > -0.5 then | |
790 | s.Pitch = .7 | |
791 | s.Volume = 5 | |
792 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(0)), .1) | |
793 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
794 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
795 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
796 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
797 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
798 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
799 | end | |
800 | ||
801 | ||
802 | if RootPart.Velocity.y < -1 then | |
803 | s.Pitch = .9 | |
804 | s.Volume = 5 | |
805 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -1.1) * angles(math.rad(-90), math.rad(0), math.rad(180)), .3) | |
806 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-1 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
807 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
808 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
809 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
810 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
811 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) end | |
812 | ||
813 | end | |
814 | if Torsovelocity > 1 then | |
815 | Climbanim = false | |
816 | end | |
817 | end | |
818 | attack = false | |
819 | end | |
820 | end | |
821 | Humanoid.Climbing:connect(onClimbing) | |
822 | ||
823 | ||
824 | ||
825 | end | |
826 | end | |
827 | ||
828 | ||
829 | if #Effects > 0 then | |
830 | for e = 1, #Effects do | |
831 | if Effects[e] ~= nil then | |
832 | local Thing = Effects[e] | |
833 | if Thing ~= nil then | |
834 | local Part = Thing[1] | |
835 | local Mode = Thing[2] | |
836 | local Delay = Thing[3] | |
837 | local IncX = Thing[4] | |
838 | local IncY = Thing[5] | |
839 | local IncZ = Thing[6] | |
840 | if Thing[1].Transparency <= 1 then | |
841 | if Thing[2] == "Block1" then | |
842 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
843 | local Mesh = Thing[1].Mesh | |
844 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
845 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
846 | elseif Thing[2] == "Block2" then | |
847 | Thing[1].CFrame = Thing[1].CFrame+Vector3.new(0,-.0,0) | |
848 | local Mesh = Thing[7] | |
849 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
850 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
851 | elseif Thing[2] == "Block3" then | |
852 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))+Vector3.new(0,.15,0) | |
853 | local Mesh = Thing[7] | |
854 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
855 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
856 | elseif Thing[2] == "Cylinder" then | |
857 | local Mesh = Thing[1].Mesh | |
858 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
859 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
860 | elseif Thing[2] == "Blood" then | |
861 | local Mesh = Thing[7] | |
862 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
863 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
864 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
865 | elseif Thing[2] == "Elec" then | |
866 | local Mesh = Thing[1].Mesh | |
867 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
868 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
869 | elseif Thing[2] == "Disappear" then | |
870 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
871 | elseif Thing[2] == "Shatter" then | |
872 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
873 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
874 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
875 | Thing[6] = Thing[6] + Thing[5] | |
876 | end | |
877 | else | |
878 | Part.Parent = nil | |
879 | table.remove(Effects, e) | |
880 | end | |
881 | end | |
882 | end | |
883 | end | |
884 | end | |
885 | end) | |
886 | ||
887 | ||
888 | Effects = { | |
889 | Block = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
890 | ||
891 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
892 | prt.Anchored = true | |
893 | prt.CFrame = cframe | |
894 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
895 | game:GetService("Debris"):AddItem(prt, 10) | |
896 | if Type == 1 or Type == nil then | |
897 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh}) | |
898 | else | |
899 | if Type == 2 then | |
900 | table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh}) | |
901 | else | |
902 | table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh}) | |
903 | end | |
904 | end | |
905 | end | |
906 | } | |
907 | , | |
908 | Sphere = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
909 | ||
910 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
911 | prt.Anchored = true | |
912 | prt.CFrame = cframe | |
913 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
914 | game:GetService("Debris"):AddItem(prt, 10) | |
915 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
916 | end | |
917 | } | |
918 | , | |
919 | Cylinder = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
920 | ||
921 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
922 | prt.Anchored = true | |
923 | prt.CFrame = cframe | |
924 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
925 | game:GetService("Debris"):AddItem(prt, 10) | |
926 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
927 | end | |
928 | } | |
929 | , | |
930 | Wave = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
931 | ||
932 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
933 | prt.Anchored = true | |
934 | prt.CFrame = cframe | |
935 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1/60, y1/60, z1/60)) | |
936 | game:GetService("Debris"):AddItem(prt, 10) | |
937 | table.insert(Effects, {prt, "Cylinder", delay, x3/60, y3/60, z3/60, msh}) | |
938 | end | |
939 | } | |
940 | , | |
941 | Ring = {Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
942 | ||
943 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
944 | prt.Anchored = true | |
945 | prt.CFrame = cframe | |
946 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
947 | game:GetService("Debris"):AddItem(prt, 10) | |
948 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh}) | |
949 | end | |
950 | } | |
951 | , | |
952 | Break = {Create = function(brickcolor, cframe, x1, y1, z1) | |
953 | ||
954 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
955 | prt.Anchored = true | |
956 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
957 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
958 | local num = math.random(10, 50) / 1000 | |
959 | game:GetService("Debris"):AddItem(prt, 10) | |
960 | table.insert(Effects, {prt, "Shatter", num, prt.CFrame, math.random() - math.random(), 0, math.random(50, 100) / 100}) | |
961 | end | |
962 | } | |
963 | } | |
964 | ||
965 | ||
966 | ||
967 | RemoveOutlines = function(part) | |
968 | ||
969 | part.TopSurface = 10 | |
970 | end | |
971 | ||
972 | CreatePart = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
973 | ||
974 | local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material}) | |
975 | RemoveOutlines(Part) | |
976 | return Part | |
977 | end | |
978 | ||
979 | CreateMesh = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
980 | ||
981 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
982 | if Mesh == "SpecialMesh" then | |
983 | Msh.MeshType = MeshType | |
984 | Msh.MeshId = MeshId | |
985 | end | |
986 | return Msh | |
987 | end | |
988 | ||
989 | CreateWeld = function(Parent, Part0, Part1, C0, C1) | |
990 | ||
991 | local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1}) | |
992 | return Weld | |
993 | end | |
994 | ||
995 | ||
996 | ||
997 | ||
998 | WSHM = {'White',"Pastel light red"} | |
999 | WSH = WSHM[math.random(1,#WSHM)] | |
1000 | ||
1001 | ||
1002 | IcePartFunk = function(HPart,aria,Min,Max) | |
1003 | ||
1004 | IcePart = Instance.new("Part",HPart) | |
1005 | IcePart.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1006 | IcePart.CanCollide = false | |
1007 | IuW = Instance.new("Weld") | |
1008 | IuW.Name = "GuW" | |
1009 | IuW.Part0 = HPart | |
1010 | IuW.C0 = cn(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria))*angles( math.random(-180, 180),math.random(-180, 180),math.random(-180, 180)) | |
1011 | IuW.C1 = cn(0, math.random(-aria/2, aria/2), 0) | |
1012 | IuW.Part1 = IcePart | |
1013 | IuW.Parent = HPart | |
1014 | IcePart.Transparency = .85 | |
1015 | IcePart.Material= "Neon" | |
1016 | WSH = WSHM[math.random(1,#WSHM)] | |
1017 | IcePart.BrickColor = BrickColor.new(""..WSH) | |
1018 | ||
1019 | RemoveOutlines(IcePart) | |
1020 | game:GetService("Debris"):AddItem(IuW, 4) | |
1021 | game:GetService("Debris"):AddItem(IcePart, 6) | |
1022 | ||
1023 | ||
1024 | end | |
1025 | --[[ | |
1026 | GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max) | |
1027 | ||
1028 | IcePart2 = Instance.new("Part",HPart) | |
1029 | IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1030 | IcePart2.CanCollide = false | |
1031 | RemoveOutlines(IcePart2) | |
1032 | IcePart2.Anchored = true | |
1033 | ||
1034 | ||
1035 | ||
1036 | IcePart2.CFrame=CFrame.new(Hit.Position* Vector3.new(math.random(-aria, aria),math.random(-aria, aria),math.random(-aria, aria))) | |
1037 | ||
1038 | ||
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | IcePart2.Transparency = .85 | |
1044 | IcePart2.Material= "Neon" | |
1045 | ||
1046 | IcePart2.BrickColor = BrickColor.new(""..color) | |
1047 | ||
1048 | ||
1049 | ||
1050 | game:GetService("Debris"):AddItem(IcePart2, 6) | |
1051 | ||
1052 | ||
1053 | end | |
1054 | --]] | |
1055 | GroundPartFunk2 = function(Hit,HPart,color,aria,Min,Max,num) | |
1056 | ||
1057 | IcePart2 = Instance.new("Part",HPart) | |
1058 | IcePart2.Size = Vector3.new(math.random(Min, Max),math.random(Min, Max),math.random(Min, Max)) | |
1059 | IcePart2.CanCollide = false | |
1060 | RemoveOutlines(IcePart2) | |
1061 | IcePart2.Anchored = true | |
1062 | game:GetService("Debris"):AddItem(IcePart2, .4) | |
1063 | IcePart2.Transparency = .3 | |
1064 | IcePart2.Material= "Neon" | |
1065 | IcePart2.BrickColor = BrickColor.new(""..color) | |
1066 | ||
1067 | IcePart2.CFrame=CFrame.new(Hit.Position+ Vector3.new(math.random(-aria, aria),math.random(-aria, 0),math.random(-aria, aria)))*angles(math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45)),math.rad(math.random(-45, 45))) | |
1068 | for i = 0,num do | |
1069 | if num > 1 then | |
1070 | GroundPartFunk2(Hit,HPart,color,aria,Min,Max,0) | |
1071 | end | |
1072 | end | |
1073 | ||
1074 | ||
1075 | ||
1076 | ||
1077 | ||
1078 | ||
1079 | ||
1080 | ||
1081 | ||
1082 | ||
1083 | ||
1084 | end | |
1085 | ||
1086 | ||
1087 | ||
1088 | ||
1089 | ||
1090 | SpikeMeshId = 1033714 | |
1091 | local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
1092 | ||
1093 | ||
1094 | local Part = Instance.new("Part", Parent) | |
1095 | Part.Name = Name | |
1096 | Part.BrickColor = BrickColor.new(Color) | |
1097 | Part.Size = Size | |
1098 | Part.Material = Material | |
1099 | Part.Transparency = Transparency | |
1100 | Part.CanCollide = false | |
1101 | RemoveOutlines(Part) | |
1102 | ||
1103 | local Mesh = Instance.new("SpecialMesh", Part) | |
1104 | Mesh.MeshType = "Sphere" | |
1105 | Mesh.Scale = Scale | |
1106 | ||
1107 | return Mesh and Part | |
1108 | ||
1109 | end | |
1110 | ||
1111 | ||
1112 | ||
1113 | ||
1114 | ||
1115 | ||
1116 | ||
1117 | ||
1118 | CFuncs = { | |
1119 | Part = {Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
1120 | ||
1121 | local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material}) | |
1122 | RemoveOutlines(Part) | |
1123 | return Part | |
1124 | end | |
1125 | } | |
1126 | , | |
1127 | Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
1128 | ||
1129 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
1130 | if Mesh == "SpecialMesh" then | |
1131 | Msh.MeshType = MeshType | |
1132 | Msh.MeshId = MeshId | |
1133 | end | |
1134 | return Msh | |
1135 | end | |
1136 | } | |
1137 | , | |
1138 | Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
1139 | ||
1140 | local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale}) | |
1141 | if Mesh == "SpecialMesh" then | |
1142 | Msh.MeshType = MeshType | |
1143 | Msh.MeshId = MeshId | |
1144 | end | |
1145 | return Msh | |
1146 | end | |
1147 | } | |
1148 | , | |
1149 | Weld = {Create = function(Parent, Part0, Part1, C0, C1) | |
1150 | ||
1151 | local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1}) | |
1152 | return Weld | |
1153 | end | |
1154 | } | |
1155 | , | |
1156 | Sound = {Create = function(id, par, vol, pit) | |
1157 | ||
1158 | coroutine.resume(coroutine.create(function() | |
1159 | ||
1160 | local S = Create("Sound")({Volume = vol, Pitch = pit or 1, SoundId = id, Parent = par or workspace}) | |
1161 | wait() | |
1162 | S:play() | |
1163 | game:GetService("Debris"):AddItem(S, 6) | |
1164 | end | |
1165 | )) | |
1166 | end | |
1167 | } | |
1168 | , | |
1169 | ParticleEmitter = {Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
1170 | ||
1171 | local fp = Create("ParticleEmitter")({Parent = Parent, Color = ColorSequence.new(Color1, Color2), LightEmission = LightEmission, Size = Size, Texture = Texture, Transparency = Transparency, ZOffset = ZOffset, Acceleration = Accel, Drag = Drag, LockedToPart = LockedToPart, VelocityInheritance = VelocityInheritance, EmissionDirection = EmissionDirection, Enabled = Enabled, Lifetime = LifeTime, Rate = Rate, Rotation = Rotation, RotSpeed = RotSpeed, Speed = Speed, VelocitySpread = VelocitySpread}) | |
1172 | return fp | |
1173 | end | |
1174 | } | |
1175 | } | |
1176 | ||
1177 | ||
1178 | ||
1179 | ||
1180 | ||
1181 | Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
1182 | ||
1183 | if hit.Parent == nil then | |
1184 | return | |
1185 | end | |
1186 | local h = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1187 | for _,v in pairs(hit.Parent:children()) do | |
1188 | if v:IsA("Humanoid") then | |
1189 | h.MaxHealth = 100 | |
1190 | h = v | |
1191 | end | |
1192 | end | |
1193 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
1194 | if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
1195 | return | |
1196 | end | |
1197 | local c = Create("ObjectValue")({Name = "creator", Value = game:service("Players").LocalPlayer, Parent = h}) | |
1198 | game:GetService("Debris"):AddItem(c, 0.5) | |
1199 | if HitSound ~= nil and HitPitch ~= nil then | |
1200 | CreateSound(HitSound, hit, 1, HitPitch) | |
1201 | end | |
1202 | local Damage = math.random(minim, maxim) | |
1203 | local blocked = false | |
1204 | local block = hit.Parent:findFirstChild("Block") | |
1205 | if block ~= nil and block.className == "IntValue" and block.Value > 0 then | |
1206 | blocked = true | |
1207 | block.Value = block.Value - 1 | |
1208 | print(block.Value) | |
1209 | end | |
1210 | if blocked == false then | |
1211 | h.Health = h.Health - Damage | |
1212 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
1213 | else | |
1214 | h.Health = h.Health - Damage / 2 | |
1215 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
1216 | end | |
1217 | if hit.Parent:FindFirstChild("Torso") ~= nil then | |
1218 | lasthit = hit.Parent.Torso | |
1219 | end | |
1220 | if Type == "Knockdown" then | |
1221 | local hum = hit.Parent.Humanoid | |
1222 | hum.PlatformStand = true | |
1223 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1224 | ||
1225 | swait(.2) | |
1226 | HHumanoid.PlatformStand = false | |
1227 | end | |
1228 | ), hum) | |
1229 | local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit | |
1230 | local bodvol = Create("BodyVelocity")({velocity = angle * knockback, P = 50, maxForce = Vector3.new(80000, 80000, 80000), Parent = hit}) | |
1231 | local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(5000, 5000, 5000) * 50, angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), Parent = hit}) | |
1232 | game:GetService("Debris"):AddItem(bodvol, 0.1) | |
1233 | game:GetService("Debris"):AddItem(rl, 0.1) | |
1234 | elseif Type == "Normal" then | |
1235 | local vp = Create("BodyVelocity")({P = 500, maxForce = Vector3.new(math.huge, 0, math.huge), velocity = Property.CFrame.lookVector * knockback}) | |
1236 | if knockback > 0 then | |
1237 | vp.Parent = hit.Parent.Torso | |
1238 | end | |
1239 | game:GetService("Debris"):AddItem(vp, 0.5) | |
1240 | elseif Type == "Impale" then | |
1241 | ||
1242 | local Spike = CreateSpike(Services.Workspace, "Ice Spike", "Really red", Vector3.new(1,2,1), "Neon", .2, Vector3.new(.5,25,.5)) | |
1243 | Spike.Anchored = true | |
1244 | Spike.Rotation = Vector3.new(math.random(-45,45), 0 , math.random(-45,45)) | |
1245 | Spike.Position = hit.Parent.Torso.Position | |
1246 | ||
1247 | Services.Debris:AddItem(Spike, 4) | |
1248 | ||
1249 | ||
1250 | ||
1251 | ||
1252 | ||
1253 | ||
1254 | CFuncs.Sound.Create("http://www.roblox.com/asset/?id=268249319", Spike, .8, 2) | |
1255 | hit.Parent.Humanoid.PlatformStand = true | |
1256 | ||
1257 | ||
1258 | swait(1) | |
1259 | hit.Parent.Humanoid.PlatformStand = false | |
1260 | elseif Type == "Up" then | |
1261 | local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit}) | |
1262 | game:GetService("Debris"):AddItem(bodyVelocity, 0.1) | |
1263 | local bodyVelocity = Create("BodyVelocity")({velocity = Vector3.new(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit}) | |
1264 | game:GetService("Debris"):AddItem(bodyVelocity, .1) | |
1265 | ||
1266 | ||
1267 | ||
1268 | elseif Type == "UltSlice" then | |
1269 | ||
1270 | BlockEffect( BrickColor.new("Really red"), SwHandle.CFrame * cn(0, 1.8, 0), 16, 141, .5, 0,0,0, 0.01,2) | |
1271 | BlockEffect( BrickColor.new("Really red"), Head.CFrame, 21, 21, 21, 0,0,0, 0.01,2) | |
1272 | BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.01,2) | |
1273 | BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1274 | BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1275 | BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1276 | BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.01,2) | |
1277 | ||
1278 | ||
1279 | elseif Type == "Slice" then | |
1280 | local bp2 = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Head.Position, Parent = hit.Parent.Torso}) | |
1281 | game:GetService("Debris"):AddItem(bp2, 1) | |
1282 | ||
1283 | if hit.Parent:FindFirstChild("HumanoidRootPart") ~= nil then | |
1284 | for i = 1,10 do | |
1285 | Effects.Break.Create (BrickColor.new("Really red"), hit.Parent.HumanoidRootPart.CFrame, 10, .5, .5) | |
1286 | ||
1287 | ||
1288 | end | |
1289 | end | |
1290 | ||
1291 | ||
1292 | ||
1293 | ||
1294 | elseif Type == "Snare" then | |
1295 | local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1296 | game:GetService("Debris"):AddItem(bp, 1) | |
1297 | elseif Type == "Slowness" then | |
1298 | local SpeedSave=hit.Parent.Humanoid.WalkSpeed | |
1299 | ||
1300 | for i = 1,25 do | |
1301 | hit.Parent.Humanoid.WalkSpeed = 4 | |
1302 | IcePartFunk(hit.Parent.Torso,.55,0.1,1) | |
1303 | end | |
1304 | wait(4) | |
1305 | hit.Parent.Humanoid.WalkSpeed = SpeedSave | |
1306 | elseif Type == "Firedmg" then | |
1307 | ||
1308 | for i = 1,math.random(1, 6) do | |
1309 | if hit.Parent:FindFirstChild("Torso") ~= nil then | |
1310 | BlockEffect( BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 20, 20, 20, 1.5, 1.5, 1.5, 0.05,3) | |
1311 | BlockEffect(BrickColor.new("Gold"), hit.Parent.Torso.CFrame, 20, 20, 20, 2, 2, 2, 0.05,3) | |
1312 | BlockEffect(BrickColor.new("Really black"), hit.Parent.Torso.CFrame, 0, 0, 0, 2, 2, 2, 0.035,3) | |
1313 | ||
1314 | ||
1315 | ||
1316 | wait(.1) | |
1317 | end | |
1318 | end | |
1319 | ||
1320 | elseif Type == "Freeze" then | |
1321 | local bp = Create("BodyPosition")({P = 900, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1322 | game:GetService("Debris"):AddItem(bp, 4) | |
1323 | for i=1,25 do | |
1324 | IcePartFunk(hit.Parent.Torso,1,1.5,2) | |
1325 | end | |
1326 | elseif Type == "Freeze2" then | |
1327 | local BodPos = Create("BodyPosition")({P = 50000, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso}) | |
1328 | local BodGy = Create("BodyGyro")({maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, P = 20000, Parent = hit.Parent.Torso, cframe = hit.Parent.Torso.CFrame}) | |
1329 | hit.Parent.Torso.Anchored = true | |
1330 | coroutine.resume(coroutine.create(function(Part) | |
1331 | ||
1332 | swait(1.5) | |
1333 | Part.Anchored = false | |
1334 | end | |
1335 | ), hit.Parent.Torso) | |
1336 | game:GetService("Debris"):AddItem(BodPos, 3) | |
1337 | game:GetService("Debris"):AddItem(BodGy, 3) | |
1338 | end | |
1339 | local debounce = Create("BoolValue")({Name = "DebounceHit", Parent = hit.Parent, Value = true}) | |
1340 | game:GetService("Debris"):AddItem(debounce, Delay) | |
1341 | c = Instance.new("ObjectValue") | |
1342 | c.Name = "creator" | |
1343 | c.Value = Player | |
1344 | c.Parent = h | |
1345 | game:GetService("Debris"):AddItem(c, 0.5) | |
1346 | end | |
1347 | end | |
1348 | ||
1349 | ShowDamage = function(Pos, Text, Time, Color) | |
1350 | ||
1351 | local Rate = 0.033333333333333 | |
1352 | if not Pos then | |
1353 | local Pos = Vector3.new(0, 0, 0) | |
1354 | end | |
1355 | local Text = Text or "" | |
1356 | local Time = Time or 2 | |
1357 | if not Color then | |
1358 | local Color = Color3.new(1, 0, 1) | |
1359 | end | |
1360 | local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
1361 | EffectPart.Anchored = true | |
1362 | local BillboardGui = Create("BillboardGui")({Size = UDim2.new(3, 0, 3, 0), Adornee = EffectPart, Parent = EffectPart}) | |
1363 | local TextLabel = Create("TextLabel")({BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, Parent = BillboardGui}) | |
1364 | game.Debris:AddItem(EffectPart, Time + 0.1) | |
1365 | EffectPart.Parent = game:GetService("Workspace") | |
1366 | delay(0, function() | |
1367 | ||
1368 | local Frames = Time / Rate | |
1369 | for Frame = 1, Frames do | |
1370 | wait(Rate) | |
1371 | local Percent = Frame / Frames | |
1372 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
1373 | TextLabel.TextTransparency = Percent | |
1374 | end | |
1375 | if EffectPart and EffectPart.Parent then | |
1376 | EffectPart:Destroy() | |
1377 | end | |
1378 | end | |
1379 | ) | |
1380 | end | |
1381 | ||
1382 | MagniDamage = function(Part, magni, mindam, maxdam, knock, Type) | |
1383 | ||
1384 | for _,c in pairs(workspace:children()) do | |
1385 | local hum = c:findFirstChildOfClass("Humanoid") | |
1386 | if hum ~= nil then | |
1387 | local head = c:findFirstChild("Head") | |
1388 | if head ~= nil then | |
1389 | local targ = head.Position - Part.Position | |
1390 | local mag = targ.magnitude | |
1391 | if mag <= magni and c.Name ~= Player.Name then | |
1392 | Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.001, "http://www.roblox.com/asset/?id=0", 1.2) | |
1393 | end | |
1394 | end | |
1395 | end | |
1396 | end | |
1397 | end | |
1398 | MagniKILL = function(Part, magni, knock, Type) | |
1399 | ||
1400 | for _,c in pairs(workspace:children()) do | |
1401 | local hum = c:findFirstChildOfClass("Humanoid") | |
1402 | if hum ~= nil then | |
1403 | local head = c:findFirstChild("Head") | |
1404 | if head ~= nil then | |
1405 | local targ = head.Position - Part.Position | |
1406 | local mag = targ.magnitude | |
1407 | if mag <= magni and c.Name ~= Player.Name then | |
1408 | hum.Health = 0 | |
1409 | end | |
1410 | end | |
1411 | end | |
1412 | end | |
1413 | end | |
1414 | EffectModel = Instance.new("Model", Character) | |
1415 | EffectModel.Name = "Effects" | |
1416 | ||
1417 | BlockEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
1418 | ||
1419 | local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
1420 | prt.Anchored = true | |
1421 | prt.CFrame = cframe | |
1422 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1423 | game:GetService("Debris"):AddItem(prt, 10) | |
1424 | if Type == 1 or Type == nil then | |
1425 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh}) | |
1426 | else | |
1427 | if Type == 2 then | |
1428 | table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh}) | |
1429 | else | |
1430 | if Type == 3 then | |
1431 | table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh}) | |
1432 | end | |
1433 | end | |
1434 | end | |
1435 | end | |
1436 | CreateSound = function(id, par, vol, pit) | |
1437 | ||
1438 | coroutine.resume(coroutine.create(function() | |
1439 | ||
1440 | local sou = Instance.new("Sound", par or workspace) | |
1441 | sou.Volume = vol | |
1442 | sou.Pitch = pit or 1 | |
1443 | sou.SoundId = id | |
1444 | swait() | |
1445 | sou:play() | |
1446 | game:GetService("Debris"):AddItem(sou, 6) | |
1447 | end | |
1448 | )) | |
1449 | end | |
1450 | ||
1451 | Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1452 | ||
1453 | local prt = CreatePart(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
1454 | prt.Anchored = true | |
1455 | prt.CFrame = cframe | |
1456 | prt.Material = "Neon" | |
1457 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1458 | game:GetService("Debris"):AddItem(prt, 10) | |
1459 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1460 | ||
1461 | for i = 0, 6, delay do | |
1462 | swait() | |
1463 | Part.Transparency = i | |
1464 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
1465 | end | |
1466 | Part.Parent = nil | |
1467 | end | |
1468 | ), prt, msh) | |
1469 | end | |
1470 | ||
1471 | shoottraildd = function(mouse, partt, SpreadAmount) | |
1472 | ||
1473 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount/10, SpreadAmount/10), math.random(-SpreadAmount, SpreadAmount)) | |
1474 | local MainPos = mouse + Vector3.new(0, 6, 0)+RootPart.CFrame.lookVector*-2 | |
1475 | local MainPos2 = mouse + SpreadVectors | |
1476 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1477 | local speed = 100 | |
1478 | local num = 1 | |
1479 | coroutine.resume(coroutine.create(function() | |
1480 | ||
1481 | repeat | |
1482 | swait() | |
1483 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1484 | local mag = (MainPos - pos).magnitude | |
1485 | Laser(BrickColor.new("Really red"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 0, mag * (speed / (speed / 2)), 0, -0, 0, -0, 10) | |
1486 | MainPos = MainPos + MouseLook.lookVector * speed | |
1487 | num = num - 1 | |
1488 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1489 | if hit ~= nil then | |
1490 | num = 0 | |
1491 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1492 | refpart.Anchored = true | |
1493 | refpart.CFrame = CFrame.new(pos) | |
1494 | game:GetService("Debris"):AddItem(refpart, 2) | |
1495 | end | |
1496 | do | |
1497 | if num <= 0 then | |
1498 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1499 | refpart.Anchored = true | |
1500 | refpart.CFrame = CFrame.new(pos) | |
1501 | if hit ~= nil then | |
1502 | ||
1503 | ||
1504 | ||
1505 | GroundPartFunk2(refpart,EffectModel,"Really red",1,.1,2,2) | |
1506 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 70, 70, 70, -.5, -.5, -.5, 0.05) | |
1507 | -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07) | |
1508 | -- BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.07) | |
1509 | MagniDamage(refpart, 6, 10, 25, 0, "Slice") | |
1510 | end | |
1511 | game:GetService("Debris"):AddItem(refpart, 0) | |
1512 | end | |
1513 | end | |
1514 | until num <= 0 | |
1515 | end | |
1516 | )) | |
1517 | end | |
1518 | ||
1519 | shoottraildd2 = function(mouse, partt, SpreadAmount) | |
1520 | ||
1521 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1522 | local MainPos = partt.Position | |
1523 | local MainPos2 = mouse + SpreadVectors | |
1524 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1525 | local speed = 1000 | |
1526 | local num = 1 | |
1527 | coroutine.resume(coroutine.create(function() | |
1528 | ||
1529 | repeat | |
1530 | swait() | |
1531 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1532 | local mag = (MainPos - pos).magnitude | |
1533 | Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -8.175, 0, -8.175, 0.15) | |
1534 | MainPos = MainPos + MouseLook.lookVector * speed | |
1535 | num = num - 1 | |
1536 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1537 | if hit ~= nil then | |
1538 | num = 0 | |
1539 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1540 | refpart.Anchored = true | |
1541 | refpart.CFrame = CFrame.new(pos) | |
1542 | game:GetService("Debris"):AddItem(refpart, 2) | |
1543 | end | |
1544 | do | |
1545 | if num <= 0 then | |
1546 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1547 | refpart.Anchored = true | |
1548 | refpart.CFrame = CFrame.new(pos) | |
1549 | if hit ~= nil then | |
1550 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1551 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 86.5, 86.5, 86.5, 0.05) | |
1552 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05) | |
1553 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 87, 87, 87, 0.05) | |
1554 | MagniKILL(refpart, 80, 0, "Normal") | |
1555 | end | |
1556 | game:GetService("Debris"):AddItem(refpart, 0) | |
1557 | end | |
1558 | end | |
1559 | until num <= 0 | |
1560 | end | |
1561 | )) | |
1562 | end | |
1563 | ||
1564 | shoottraildd3 = function(mouse, partt, SpreadAmount, dmg) | |
1565 | ||
1566 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1567 | local MainPos = partt.Position | |
1568 | local MainPos2 = mouse + SpreadVectors | |
1569 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1570 | local speed = 200 | |
1571 | local num = 0 | |
1572 | coroutine.resume(coroutine.create(function() | |
1573 | ||
1574 | repeat | |
1575 | swait() | |
1576 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1577 | local mag = (MainPos - pos).magnitude | |
1578 | Laser(BrickColor.new("White"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -0.375, 0, -0.375, 0.05) | |
1579 | MainPos = MainPos + MouseLook.lookVector * speed | |
1580 | num = num - 1 | |
1581 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1582 | if hit ~= nil then | |
1583 | num = 0 | |
1584 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1585 | refpart.Anchored = true | |
1586 | refpart.CFrame = CFrame.new(pos) | |
1587 | BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1588 | game:GetService("Debris"):AddItem(refpart, 2) | |
1589 | end | |
1590 | do | |
1591 | if num <= 0 then | |
1592 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1593 | refpart.Anchored = true | |
1594 | refpart.CFrame = CFrame.new(pos) | |
1595 | if hit ~= nil then | |
1596 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1597 | BlockEffect(BrickColor.new("White"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05) | |
1598 | BlockEffect(BrickColor.new("Pastel light red"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1599 | ||
1600 | ||
1601 | MagniDamage(refpart, 6, dmg, dmg, 0, "Slowness") | |
1602 | ||
1603 | end | |
1604 | game:GetService("Debris"):AddItem(refpart, 0) | |
1605 | end | |
1606 | end | |
1607 | until num <= 0 | |
1608 | end | |
1609 | )) | |
1610 | end | |
1611 | ||
1612 | shoottraildd4 = function(mouse, partt, SpreadAmount, dmg) | |
1613 | ||
1614 | local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount)) | |
1615 | local MainPos = partt.Position | |
1616 | local MainPos2 = mouse + SpreadVectors | |
1617 | local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2) | |
1618 | local speed = 150 | |
1619 | local num = 1 | |
1620 | coroutine.resume(coroutine.create(function() | |
1621 | ||
1622 | repeat | |
1623 | swait() | |
1624 | local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent) | |
1625 | local mag = (MainPos - pos).magnitude | |
1626 | Laser(BrickColor.new("Gold"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1.175, 0, -1.175, 0.15) | |
1627 | MainPos = MainPos + MouseLook.lookVector * speed | |
1628 | num = num - 1 | |
1629 | MouseLook = MouseLook * angles(math.rad(-1), 0, 0) | |
1630 | if hit ~= nil then | |
1631 | num = 0 | |
1632 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1633 | refpart.Anchored = true | |
1634 | refpart.CFrame = CFrame.new(pos) | |
1635 | game:GetService("Debris"):AddItem(refpart, 2) | |
1636 | end | |
1637 | do | |
1638 | if num <= 0 then | |
1639 | local refpart = CreatePart(EffectModel, "Neon", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1640 | refpart.Anchored = true | |
1641 | refpart.CFrame = CFrame.new(pos) | |
1642 | if hit ~= nil then | |
1643 | CreateSound("http://www.roblox.com/asset/?id=514867425", refpart, 2, 1) | |
1644 | BlockEffect( BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 6.5, 6.5, 6.5, 0.05) | |
1645 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1646 | BlockEffect(BrickColor.new("Gold"), refpart.CFrame, 1, 1, 1, 7, 7, 7, 0.05) | |
1647 | MagniDamage(refpart, 6, dmg, dmg, 0, "Normal") | |
1648 | end | |
1649 | game:GetService("Debris"):AddItem(refpart, 0) | |
1650 | end | |
1651 | end | |
1652 | until num <= 0 | |
1653 | end | |
1654 | )) | |
1655 | end | |
1656 | ||
1657 | ||
1658 | ||
1659 | ||
1660 | ||
1661 | ||
1662 | ||
1663 | HitpartFunk3 = function(HPart3,Xv,Yv,Zv) | |
1664 | ||
1665 | Hitpart3 = Instance.new("Part",HPart3) | |
1666 | RemoveOutlines(Hitpart3) | |
1667 | Hitpart3.Size = Vector3.new(1,1,1) | |
1668 | Hitpart3.CanCollide = false | |
1669 | HuW3 = Instance.new("Weld") | |
1670 | HuW3.Name = "GuW" | |
1671 | HuW3.Part0 = HPart3 | |
1672 | HuW3.C0 = cn(Xv, Yv, Zv) | |
1673 | HuW3.C1 = cn(0, 0, 0) | |
1674 | HuW3.Part1 = Hitpart3 | |
1675 | HuW3.Parent = HPart3 | |
1676 | Hitpart3.Transparency = 1 | |
1677 | game:GetService("Debris"):AddItem(Hitpart3, 20) | |
1678 | end | |
1679 | ||
1680 | HitpartFunk2 = function(HPart2,Xv,Yv,Zv) | |
1681 | ||
1682 | Hitpart2 = Instance.new("Part",HPart2) | |
1683 | RemoveOutlines(Hitpart2) | |
1684 | Hitpart2.Size = Vector3.new(1,1,1) | |
1685 | Hitpart2.CanCollide = false | |
1686 | HuW2 = Instance.new("Weld") | |
1687 | HuW2.Name = "GuW" | |
1688 | HuW2.Part0 = HPart2 | |
1689 | HuW2.C0 = cn(Xv, Yv, Zv) | |
1690 | HuW2.C1 = cn(0, 0, 0) | |
1691 | HuW2.Part1 = Hitpart2 | |
1692 | HuW2.Parent = HPart2 | |
1693 | Hitpart2.Transparency = 1 | |
1694 | game:GetService("Debris"):AddItem(Hitpart2, 20) | |
1695 | end | |
1696 | ||
1697 | ||
1698 | HitpartFunk = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb) | |
1699 | ||
1700 | Hitpart = Instance.new("Part",HPart) | |
1701 | RemoveOutlines(Hitpart) | |
1702 | Hitpart.Size = Vector3.new(1,1,1) | |
1703 | Hitpart.CanCollide = false | |
1704 | HuW = Instance.new("Weld") | |
1705 | HuW.Name = "GuW" | |
1706 | HuW.Part0 = HPart | |
1707 | HuW.C0 = cn(Xv, Yv, Zv) | |
1708 | HuW.C1 = cn(0, 0, 0) | |
1709 | HuW.Part1 = Hitpart | |
1710 | HuW.Parent = HPart | |
1711 | Hitpart.Transparency = 1 | |
1712 | game:GetService("Debris"):AddItem(Hitpart2, 20) | |
1713 | MagniDamage(Hitpart, 4.5, Min, Max, kb, atype) | |
1714 | ||
1715 | end | |
1716 | HitpartFunk4 = function(HPart,Min,Max,Xv,Yv,Zv,atype,kb) | |
1717 | ||
1718 | Hitpart4 = Instance.new("Part",HPart) | |
1719 | RemoveOutlines(Hitpart4) | |
1720 | Hitpart4.Size = Vector3.new(1,1,1) | |
1721 | Hitpart4.CanCollide = false | |
1722 | HuW4 = Instance.new("Weld") | |
1723 | HuW4.Name = "HuW4" | |
1724 | HuW4.Part0 = HPart | |
1725 | HuW4.C0 = cn(Xv, Yv, Zv) | |
1726 | HuW4.C1 = cn(0, 0, 0) | |
1727 | HuW4.Part1 = Hitpart4 | |
1728 | HuW4.Parent = HPart | |
1729 | Hitpart4.Transparency = 1 | |
1730 | game:GetService("Debris"):AddItem(Hitpart4, 1.5) | |
1731 | MagniDamage(Hitpart4, 6.5, Min, Max, kb, atype) | |
1732 | ||
1733 | end | |
1734 | ||
1735 | ||
1736 | HitboxFunction = function(Pose,lifetime,siz1,siz2,siz3,Radie,Min,Max,kb,atype) | |
1737 | ||
1738 | Hitboxpart = Instance.new("Part",Character) | |
1739 | RemoveOutlines(Hitboxpart) | |
1740 | Hitboxpart.Size = Vector3.new(siz1,siz2,siz3) | |
1741 | Hitboxpart.CanCollide = false | |
1742 | Hitboxpart.Transparency = 1 | |
1743 | Hitboxpart.Anchored = true | |
1744 | Hitboxpart.CFrame = Pose | |
1745 | game:GetService("Debris"):AddItem(Hitboxpart, lifetime) | |
1746 | MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype) | |
1747 | ||
1748 | end | |
1749 | ||
1750 | ||
1751 | wait2 = false | |
1752 | ||
1753 | ||
1754 | combo = 1 | |
1755 | ||
1756 | ||
1757 | ||
1758 | ||
1759 | duljump = false | |
1760 | duljump2 = false | |
1761 | jumpatck = false | |
1762 | mouse.KeyDown:connect(function(k) | |
1763 | if k == "0" then | |
1764 | CFuncs['Sound'].Create("rbxassetid://891338458",Character,6,1) | |
1765 | Runkey = true | |
1766 | end | |
1767 | if k == "x" then | |
1768 | airtime:play() | |
1769 | end | |
1770 | if k == "c" then | |
1771 | CFuncs['Sound'].Create("rbxassetid://892075913",Character,6,1) | |
1772 | end | |
1773 | if k == "q" and attack == false then | |
1774 | attack = true | |
1775 | Humanoid.WalkSpeed = 0 | |
1776 | IKM = true | |
1777 | body.BrickColor = BrickColor.new("New Yeller") | |
1778 | body.Color = Color3.new(1,1,0) | |
1779 | body.Reflectance = 0 | |
1780 | particle.LightEmission = 0.3 | |
1781 | particle.Texture = "rbxassetid://241629053" | |
1782 | particle.Color = ColorSequence.new(Color3.new(1,1,0)) | |
1783 | particle.Enabled = true | |
1784 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1785 | wait(0.1) | |
1786 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1787 | wait(1) | |
1788 | particle.Enabled = false | |
1789 | wait(2) | |
1790 | Humanoid.WalkSpeed = 30 | |
1791 | attack = false | |
1792 | end | |
1793 | ||
1794 | if k == "t" and attack == false then | |
1795 | attack = true | |
1796 | IKM = false | |
1797 | Humanoid.WalkSpeed = 0 | |
1798 | body.BrickColor = BrickColor.new("Really red") | |
1799 | body.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1)) | |
1800 | body.Reflectance = 0.5 | |
1801 | particle.LightEmission = 0.3 | |
1802 | particle.Texture = "rbxassetid://241629053" | |
1803 | particle.Color = ColorSequence.new(Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))) | |
1804 | particle.Enabled = true | |
1805 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1806 | wait(0.1) | |
1807 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1808 | wait(1) | |
1809 | particle.Enabled = false | |
1810 | wait(2) | |
1811 | Humanoid.WalkSpeed = 30 | |
1812 | attack = false | |
1813 | end | |
1814 | ||
1815 | if k == "y" and attack == false then | |
1816 | attack = true | |
1817 | IKM = true | |
1818 | Humanoid.WalkSpeed = 0 | |
1819 | body.BrickColor = BrickColor.new("Really red") | |
1820 | body.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1)) | |
1821 | body.Reflectance = 0.5 | |
1822 | particle.LightEmission = 0.9 | |
1823 | particle.Texture = "rbxassetid://280516525" | |
1824 | particle.Color = ColorSequence.new(ColorsArray) | |
1825 | particle.Enabled = true | |
1826 | CFuncs['Sound'].Create("rbxassetid://168615093",Character,5,1) | |
1827 | wait(0.1) | |
1828 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1829 | wait(1) | |
1830 | particle.Enabled = false | |
1831 | wait(2) | |
1832 | Humanoid.WalkSpeed = 30 | |
1833 | attack = false | |
1834 | end | |
1835 | ||
1836 | if k == "r" and attack == false then | |
1837 | attack = true | |
1838 | Humanoid.WalkSpeed = 0 | |
1839 | IKM = false | |
1840 | body.BrickColor = BrickColor.new("Really Blue") | |
1841 | body.Color = Color3.new(0,0,1) | |
1842 | body.Reflectance = 0 | |
1843 | particle.LightEmission = 0.3 | |
1844 | particle.Texture = "rbxassetid://241629053" | |
1845 | particle.Color = ColorSequence.new(Color3.new(0,0,1)) | |
1846 | particle.Enabled = true | |
1847 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1848 | wait(0.1) | |
1849 | CFuncs['Sound'].Create("rbxassetid://843338638",Character,5,0.75) | |
1850 | wait(1) | |
1851 | particle.Enabled = false | |
1852 | wait(2) | |
1853 | Humanoid.WalkSpeed = 30 | |
1854 | attack = false | |
1855 | end | |
1856 | ||
1857 | if k == "e" and attack == false then | |
1858 | attack = true | |
1859 | ||
1860 | Humanoid.WalkSpeed = 0 | |
1861 | ||
1862 | CreateSound("http://www.roblox.com/asset/?id=135305162", Torso, 5, 1) | |
1863 | ||
1864 | for i = 0, 2, 0.1 do | |
1865 | swait() | |
1866 | ||
1867 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1868 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1869 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
1870 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(135 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
1871 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1872 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1873 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1874 | ||
1875 | ||
1876 | ||
1877 | end | |
1878 | ||
1879 | for i = 0, 4, 0.1 do | |
1880 | swait() | |
1881 | ||
1882 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1883 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-0 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1884 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(25)), 0.05) | |
1885 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-25)), 0.05) | |
1886 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1887 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1888 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1889 | ||
1890 | ||
1891 | ||
1892 | end | |
1893 | for i = 0, 1 do | |
1894 | for i = 0, 1, 0.1 do | |
1895 | swait() | |
1896 | ||
1897 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1898 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1899 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1900 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1901 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1902 | LH.C0 = clerp(LH.C0, cn(-1, -1 ,0)* LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1903 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1904 | ||
1905 | ||
1906 | ||
1907 | end | |
1908 | for i = 0, 1, 0.1 do | |
1909 | swait() | |
1910 | ||
1911 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 0, -1.1) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
1912 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-15 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
1913 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1914 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.1) | |
1915 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
1916 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
1917 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.8) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.1) | |
1918 | ||
1919 | ||
1920 | ||
1921 | end | |
1922 | end | |
1923 | ||
1924 | Humanoid.WalkSpeed = 30 | |
1925 | ||
1926 | attack = false | |
1927 | ||
1928 | ||
1929 | ||
1930 | ||
1931 | end | |
1932 | ||
1933 | ||
1934 | ||
1935 | ||
1936 | ||
1937 | ||
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | ||
1943 | ||
1944 | ||
1945 | ||
1946 | ||
1947 | ||
1948 | ||
1949 | end) | |
1950 | hitwait = false | |
1951 | function onTouch(part) | |
1952 | ||
1953 | local humanoid = part.Parent:findFirstChildOfClass("Humanoid") | |
1954 | local model = part.Parent | |
1955 | local torso = part.Parent:FindFirstChild("Torso") | |
1956 | local head = part.Parent:findFirstChild("Head") | |
1957 | local leftleg = part.Parent:findFirstChild("Left Leg") | |
1958 | local rightleg = part.Parent:findFirstChild("Right Leg") | |
1959 | local leftarm = part.Parent:findFirstChild("Left Arm") | |
1960 | local rightarm = part.Parent:findFirstChild("Right Arm") | |
1961 | ||
1962 | if hitwait == false and attack == false and model.Name == "Effects" == false and Runkey == true then | |
1963 | ||
1964 | hitwait = true | |
1965 | ||
1966 | ||
1967 | ||
1968 | ||
1969 | if (humanoid ~=nil) and humanoid.Health >0.01 and Torsovelocity > 1 then | |
1970 | ||
1971 | if IKM == true then | |
1972 | Effects.Sphere.Create(BrickColor.new("Really black"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 40,40,40, 0.1) | |
1973 | Effects.Sphere.Create(BrickColor.new("Really red"), FrontPart.CFrame * cn(0, -0, 0), 50, 50, 50, 20,20,20, 0.05) | |
1974 | model:BreakJoints() | |
1975 | CFuncs['Sound'].Create("rbxassetid://247264335",Character,4,1) | |
1976 | local sel = math.random(3) | |
1977 | if sel == 1 then | |
1978 | CFuncs['Sound'].Create("rbxassetid://247264308",Character,4,1) | |
1979 | end | |
1980 | if sel == 2 then | |
1981 | CFuncs['Sound'].Create("rbxassetid://247264326",Character,4,1) | |
1982 | end | |
1983 | if sel == 3 then | |
1984 | CFuncs['Sound'].Create("rbxassetid://247264316",Character,4,1) | |
1985 | end | |
1986 | ||
1987 | else | |
1988 | Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, .1, 12,12,0, 0.1) | |
1989 | Effects.Sphere.Create(BrickColor.new("White"), FrontPart.CFrame * cn(0, -0, 2), 100, 100, 20, 1,1,1, 0.08) | |
1990 | MagniDamage(FrontPart, 6.5, 30, 35, .3, "Knockdown") | |
1991 | CFuncs['Sound'].Create("rbxassetid://247264335",Character,4,1) | |
1992 | local sel = math.random(3) | |
1993 | if sel == 1 then | |
1994 | CFuncs['Sound'].Create("rbxassetid://247264308",Character,4,1) | |
1995 | end | |
1996 | if sel == 2 then | |
1997 | CFuncs['Sound'].Create("rbxassetid://247264326",Character,4,1) | |
1998 | end | |
1999 | if sel == 3 then | |
2000 | CFuncs['Sound'].Create("rbxassetid://247264316",Character,4,1) | |
2001 | end | |
2002 | end | |
2003 | ||
2004 | attack = true | |
2005 | Humanoid.WalkSpeed = 0 | |
2006 | local bodyVelocity2 = Create("BodyVelocity")({velocity = Vector3.new(0, 1, 0)-RootPart.CFrame.lookVector*1500, P = 50000, maxForce = Vector3.new(80000, 80000, 80000), Parent = Torso}) | |
2007 | ||
2008 | game:GetService("Debris"):AddItem(bodyVelocity2, 0.11) | |
2009 | ||
2010 | for i = 0, .5, 0.1 do | |
2011 | swait() | |
2012 | ||
2013 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0.05, 1, -0.5) * angles(math.rad(1), math.rad(0), math.rad(0)), .2) | |
2014 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(-0)), .1) | |
2015 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.01 * math.cos(sine / 8), -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
2016 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.01 * math.cos(sine / 8) , -.0) * angles(math.rad(45 - 1 * math.cos(sine / 8)), math.rad(0), math.rad(0)), 0.2) | |
2017 | RH.C0 = clerp(RH.C0, cn(1, -1 - 0.1 * math.cos(sine / 8), 0) * RHCF * angles(math.rad(-6), math.rad(0), math.rad(90 + .05 * math.cos(sine / 25))), .1) | |
2018 | LH.C0 = clerp(LH.C0, cn(-1, -1 - 0.1 * math.cos(sine / 8), -.0) * LHCF * angles(math.rad(6), math.rad(-0), math.rad(-90 + .05 * math.cos(sine / 25))), .1) | |
2019 | SWW.C0 = clerp(SWW.C0, CFrame.new(0,-1.5,-.3) * angles(math.rad(-0),math.rad(-180),math.rad(0)), 0.3) | |
2020 | ||
2021 | ||
2022 | ||
2023 | end | |
2024 | ||
2025 | ||
2026 | Humanoid.WalkSpeed = 30 | |
2027 | end | |
2028 | attack = false | |
2029 | wait(.08) | |
2030 | hitwait = false | |
2031 | end | |
2032 | ||
2033 | end | |
2034 | FrontPart.Touched:connect(onTouch) | |
2035 | ||
2036 | ||
2037 | ||
2038 | mouse.KeyUp:connect(function(k) | |
2039 | if k == "0"then | |
2040 | Runkey = false | |
2041 | ||
2042 | end | |
2043 | ||
2044 | ||
2045 | ||
2046 | ||
2047 | ||
2048 | ||
2049 | end) | |
2050 | ||
2051 | humHsave = Humanoid.Health | |
2052 | function GainCharge(Humanoid) | |
2053 | if Humanoid.Health == 0 then | |
2054 | equipped = false | |
2055 | end | |
2056 | if blocking == true then | |
2057 | ||
2058 | humDsave = Humanoid.Health | |
2059 | humDsave = humHsave - humDsave | |
2060 | if humDsave >0.01 then | |
2061 | ||
2062 | CFuncs.Sound.Create("http://www.roblox.com/asset/?id=260433850", Torso, 1, .5) | |
2063 | BlockEffect( BrickColor.new("Really red"), Torso.CFrame, 42, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2064 | BlockEffect( BrickColor.new("Really red"), RightArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2065 | BlockEffect( BrickColor.new("Really red"), LeftArm.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2066 | BlockEffect( BrickColor.new("Really red"), RightLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2067 | BlockEffect( BrickColor.new("Really red"), LeftLeg.CFrame, 22, 42, 22, 0.1,0.1,0.1, 0.02,2) | |
2068 | humDsave = humDsave/3 | |
2069 | end | |
2070 | if humDsave <0 then | |
2071 | ||
2072 | ||
2073 | Effects.Sphere.Create(BrickColor.new("Lime green"), RootPart.CFrame * cn(0, -2.97, 0), 10, 5, 10, 15,-.1,15, 0.05) | |
2074 | --[[ | |
2075 | BlockEffect( BrickColor.new("Lime green"), Torso.CFrame, 41, 41, 21, 0,0,0, 0.1,2) | |
2076 | BlockEffect( BrickColor.new("Lime green"), RightArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2077 | BlockEffect( BrickColor.new("Lime green"), LeftArm.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2078 | BlockEffect( BrickColor.new("Lime green"), RightLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2079 | BlockEffect( BrickColor.new("Lime green"), LeftLeg.CFrame, 21, 41, 21, 0,0,0, 0.1,2) | |
2080 | --]] | |
2081 | humDsave = humDsave*2.5 | |
2082 | end | |
2083 | ||
2084 | humHsave = humHsave - humDsave | |
2085 | ||
2086 | ||
2087 | ||
2088 | ||
2089 | end | |
2090 | ||
2091 | end | |
2092 | ||
2093 | Humanoid.HealthChanged:connect(function() GainCharge(Humanoid) end) | |
2094 | ||
2095 | ||
2096 | OnDeath = function() | |
2097 | ||
2098 | equipped = false | |
2099 | ||
2100 | ||
2101 | ||
2102 | end | |
2103 | ||
2104 | Humanoid.Died:connect(function()OnDeath(Character)end) | |
2105 | ||
2106 | ||
2107 | ||
2108 | print('This fucking masterpiece was totally not created by xiaxiaokid.') | |
2109 | local music=Instance.new('Sound',inside) | |
2110 | music.Name='ok music' | |
2111 | music.Volume=7 | |
2112 | music.Pitch=1 | |
2113 | music.Looped=true | |
2114 | music.SoundId = "rbxassetid://737286463" | |
2115 | local gui=Instance.new('ScreenGui',Player.PlayerGui) | |
2116 | gui.Name='you make me cri' | |
2117 | local topFrame=Instance.new('Frame',gui) | |
2118 | topFrame.Name='TopFrame' | |
2119 | topFrame.Size=UDim2.new(1,0,1,0) | |
2120 | topFrame.BorderSizePixel=0 | |
2121 | topFrame.BackgroundTransparency=1 | |
2122 | local choiceFrame=Instance.new('Frame',topFrame) | |
2123 | choiceFrame.Size=UDim2.new(.4,0,.05,0) | |
2124 | choiceFrame.Draggable=true | |
2125 | choiceFrame.BackgroundTransparency=.7 | |
2126 | choiceFrame.Position=UDim2.new(.5,0,.775,0) | |
2127 | choiceFrame.BackgroundColor3=Color3.new(0,0,0) | |
2128 | choiceFrame.BorderColor3=Color3.new(0,0,0) | |
2129 | local innerFrame3=Instance.new('Frame',choiceFrame) | |
2130 | innerFrame3.Size=UDim2.new(.5,0,1,0) | |
2131 | innerFrame3.Position=UDim2.new(.5,0,0,0) | |
2132 | innerFrame3.Draggable=true | |
2133 | innerFrame3.BackgroundTransparency=.9 | |
2134 | innerFrame3.BackgroundColor3=Color3.new(0,0,0) | |
2135 | innerFrame3.BorderColor3=Color3.new(0,0,0) | |
2136 | local innerFrame4=Instance.new('Frame',choiceFrame) | |
2137 | innerFrame4.Size=UDim2.new(.5,0,1,0) | |
2138 | innerFrame4.Draggable=false | |
2139 | innerFrame4.BackgroundTransparency=.5 | |
2140 | innerFrame4.Position=UDim2.new(.5,0,1,1) | |
2141 | innerFrame4.BackgroundColor3=Color3.new(0,0,0) | |
2142 | innerFrame4.BorderColor3=Color3.new(0,0,0) | |
2143 | local musicID=Instance.new('TextBox',innerFrame4) | |
2144 | musicID.Size=UDim2.new(.8,0,.7,0) | |
2145 | musicID.Position=UDim2.new(.1,0,.15,0) | |
2146 | musicID.BackgroundTransparency=.7 | |
2147 | musicID.Visible=true | |
2148 | musicID.Text="Music ID (press enter to use the audio)" | |
2149 | musicID.TextScaled=true | |
2150 | musicID.TextStrokeTransparency=0 | |
2151 | musicID.TextColor3=Color3.new(0,255,255) | |
2152 | musicID.BackgroundColor3=Color3.new(0,0,0) | |
2153 | musicID.BorderColor3=Color3.new(0,0,0) | |
2154 | musicID.FocusLost:connect(function(ent) | |
2155 | if ent then | |
2156 | music.SoundId="http://www.roblox.com/asset?id="..musicID.Text | |
2157 | end | |
2158 | end) | |
2159 | local bt3=Instance.new('TextButton',innerFrame3) | |
2160 | bt3.Draggable=false | |
2161 | bt3.BackgroundTransparency=.9 | |
2162 | bt3.BackgroundColor3=Color3.new(0,0,0) | |
2163 | bt3.Size=UDim2.new(.5,0,1,0) | |
2164 | bt3.Text="Play" | |
2165 | bt3.TextStrokeTransparency=0 | |
2166 | bt3.TextColor3=Color3.new(0,255,255) | |
2167 | bt3.TextScaled=true | |
2168 | bt3.Font="SciFi" | |
2169 | bt3.MouseButton1Click:connect(function() | |
2170 | if not music.IsPlaying then | |
2171 | musicID.Visible=false | |
2172 | music:play'' | |
2173 | innerFrame4.Visible=false | |
2174 | end | |
2175 | end) | |
2176 | local bt4=Instance.new('TextButton',innerFrame3) | |
2177 | bt4.Draggable=false | |
2178 | bt4.BackgroundTransparency=.9 | |
2179 | bt4.BackgroundColor3=Color3.new(0,0,0) | |
2180 | bt4.Size=UDim2.new(.5,0,1,0) | |
2181 | bt4.Position=UDim2.new(.5,0,0,0) | |
2182 | bt4.Text="Stop" | |
2183 | bt4.TextStrokeTransparency=0 | |
2184 | bt4.TextColor3=Color3.new(0,255,255) | |
2185 | bt4.TextScaled=true | |
2186 | bt4.Font="SciFi" | |
2187 | bt4.MouseButton1Click:connect(function() | |
2188 | if music.IsPlaying then | |
2189 | music:stop'' | |
2190 | musicID.Visible=true | |
2191 | innerFrame4.Visible=true | |
2192 | end | |
2193 | end) | |
2194 | while true do | |
2195 | swait() | |
2196 | Humanoid.Name = "fnwihjfbewuhgbewjhgbrjhge" | |
2197 | Humanoid.MaxHealth = math.huge | |
2198 | Humanoid.Health = math.huge | |
2199 | end |