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