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