SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local p = game.Players.LocalPlayer |
| 1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code V2 by Mokiros")
| |
| 7 | local RealPlayer = RealPlayer | |
| 8 | script.Parent = RealPlayer.Character | |
| 9 | ||
| 10 | --Fake event to make stuff like Mouse.KeyDown work | |
| 11 | local Disconnect_Function = function(this) | |
| 12 | this[1].Functions[this[2]] = nil | |
| 13 | end | |
| 14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 15 | local FakeEvent_Metatable = {__index={
| |
| 16 | Connect = function(this,f) | |
| 17 | local i = tostring(math.random(0,10000)) | |
| 18 | while this.Functions[i] do | |
| 19 | i = tostring(math.random(0,10000)) | |
| 20 | end | |
| 21 | this.Functions[i] = f | |
| 22 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 23 | end | |
| 24 | }} | |
| 25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 26 | local function fakeEvent() | |
| 27 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 28 | end | |
| 29 | ||
| 30 | --Creating fake input objects with fake variables | |
| 31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 37 | end} | |
| 38 | --Merged 2 functions into one by checking amount of arguments | |
| 39 | CAS.UnbindAction = CAS.BindAction | |
| 40 | ||
| 41 | --This function will trigger the events that have been :Connect()'ed | |
| 42 | local function TriggerEvent(self,ev,...) | |
| 43 | for _,f in pairs(self[ev].Functions) do | |
| 44 | f(...) | |
| 45 | end | |
| 46 | end | |
| 47 | FakeMouse.TriggerEvent = TriggerEvent | |
| 48 | UIS.TriggerEvent = TriggerEvent | |
| 49 | ||
| 50 | --Client communication | |
| 51 | local Event = Instance.new("RemoteEvent")
| |
| 52 | Event.Name = "UserInput_Event" | |
| 53 | Event.OnServerEvent:Connect(function(plr,io) | |
| 54 | if plr~=RealPlayer then return end | |
| 55 | FakeMouse.Target = io.Target | |
| 56 | FakeMouse.Hit = io.Hit | |
| 57 | if not io.isMouse then | |
| 58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 61 | end | |
| 62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 64 | end | |
| 65 | for _,t in pairs(CAS.Actions) do | |
| 66 | for _,k in pairs(t.Keys) do | |
| 67 | if k==io.KeyCode then | |
| 68 | t.Function(t.Name,io.UserInputState,io) | |
| 69 | end | |
| 70 | end | |
| 71 | end | |
| 72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 74 | end | |
| 75 | end) | |
| 76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 77 | local Mouse = owner:GetMouse() | |
| 78 | local UIS = game:GetService("UserInputService")
| |
| 79 | local input = function(io,RobloxHandled) | |
| 80 | if RobloxHandled then return end | |
| 81 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 83 | end | |
| 84 | UIS.InputBegan:Connect(input) | |
| 85 | UIS.InputEnded:Connect(input) | |
| 86 | ||
| 87 | local h,t | |
| 88 | --Give the server mouse data every second frame, but only if the values changed | |
| 89 | --If player is not moving their mouse, client won't fire events | |
| 90 | local HB = game:GetService("RunService").Heartbeat
| |
| 91 | while true do | |
| 92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 93 | h,t=Mouse.Hit,Mouse.Target | |
| 94 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 95 | end | |
| 96 | --Wait 2 frames | |
| 97 | for i=1,2 do | |
| 98 | HB:Wait() | |
| 99 | end | |
| 100 | end]==],script) | |
| 101 | ||
| 102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 103 | --Real game object | |
| 104 | local RealGame = game | |
| 105 | ||
| 106 | --Metatable for fake service | |
| 107 | local FakeService_Metatable = {
| |
| 108 | __index = function(self,k) | |
| 109 | local s = rawget(self,"_RealService") | |
| 110 | if s then | |
| 111 | return typeof(s[k])=="function" | |
| 112 | and function(_,...)return s[k](s,...)end or s[k] | |
| 113 | end | |
| 114 | end, | |
| 115 | __newindex = function(self,k,v) | |
| 116 | local s = rawget(self,"_RealService") | |
| 117 | if s then s[k]=v end | |
| 118 | end | |
| 119 | } | |
| 120 | local function FakeService(t,RealService) | |
| 121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 122 | return setmetatable(t,FakeService_Metatable) | |
| 123 | end | |
| 124 | ||
| 125 | --Fake game object | |
| 126 | local FakeGame = {
| |
| 127 | GetService = function(self,s) | |
| 128 | return rawget(self,s) or RealGame:GetService(s) | |
| 129 | end, | |
| 130 | Players = FakeService({
| |
| 131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 132 | },"Players"), | |
| 133 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 135 | RunService = FakeService({
| |
| 136 | _btrs = {},
| |
| 137 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 138 | BindToRenderStep = function(self,name,_,fun) | |
| 139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 140 | end, | |
| 141 | UnbindFromRenderStep = function(self,name) | |
| 142 | self._btrs[name]:Disconnect() | |
| 143 | end, | |
| 144 | },"RunService") | |
| 145 | } | |
| 146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 147 | FakeGame.service = FakeGame.GetService | |
| 148 | FakeService(FakeGame,game) | |
| 149 | --Changing owner to fake player object to support owner:GetMouse() | |
| 150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 151 | end | |
| 152 | ||
| 153 | local p = owner | |
| 154 | local char = p.Character | |
| 155 | local mouse = p:GetMouse() | |
| 156 | local larm = char["Left Arm"] | |
| 157 | local rarm = char["Right Arm"] | |
| 158 | local lleg = char["Left Leg"] | |
| 159 | local rleg = char["Right Leg"] | |
| 160 | local hed = char.Head | |
| 161 | local torso = char.Torso | |
| 162 | local hum = char.Humanoid | |
| 163 | local cam = game.Workspace.CurrentCamera | |
| 164 | local root = char.HumanoidRootPart | |
| 165 | local deb = false | |
| 166 | local shot = 0 | |
| 167 | NoAnims = false | |
| 168 | local debris=game:service"Debris" | |
| 169 | local l = game:GetService("Lighting")
| |
| 170 | local rs = game:GetService("RunService").RenderStepped
| |
| 171 | ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
| |
| 172 | math.randomseed(os.time()) | |
| 173 | for i,v in pairs (hed:GetChildren()) do | |
| 174 | if v:IsA("Sound") then
| |
| 175 | v:Destroy() | |
| 176 | end | |
| 177 | end | |
| 178 | ---------------------------------------------------- | |
| 179 | local Touche = {char.Name, }
| |
| 180 | ---------------------------------------------------- | |
| 181 | ||
| 182 | hum.MaxHealth = 150 | |
| 183 | ||
| 184 | ---------------------------------------------------- | |
| 185 | function lerp(a, b, t) -- Linear interpolation | |
| 186 | return a + (b - a)*t | |
| 187 | end | |
| 188 | ||
| 189 | function slerp(a, b, t) --Spherical interpolation | |
| 190 | dot = a:Dot(b) | |
| 191 | if dot > 0.99999 or dot < -0.99999 then | |
| 192 | return t <= 0.5 and a or b | |
| 193 | else | |
| 194 | r = math.acos(dot) | |
| 195 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
| 196 | end | |
| 197 | end | |
| 198 | ||
| 199 | function matrixInterpolate(a, b, t) | |
| 200 | local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components() | |
| 201 | local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components() | |
| 202 | local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position | |
| 203 | local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right | |
| 204 | local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up | |
| 205 | local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back | |
| 206 | local t = v1:Dot(v2) | |
| 207 | if not (t < 0 or t == 0 or t > 0) then -- Failsafe | |
| 208 | return CFrame.new() | |
| 209 | end | |
| 210 | return CFrame.new( | |
| 211 | v0.x, v0.y, v0.z, | |
| 212 | v1.x, v1.y, v1.z, | |
| 213 | v2.x, v2.y, v2.z, | |
| 214 | v3.x, v3.y, v3.z) | |
| 215 | end | |
| 216 | ---------------------------------------------------- | |
| 217 | function genWeld(a,b) | |
| 218 | local w = Instance.new("Weld",a)
| |
| 219 | w.Part0 = a | |
| 220 | w.Part1 = b | |
| 221 | return w | |
| 222 | end | |
| 223 | function weld(a, b) | |
| 224 | local weld = Instance.new("Weld")
| |
| 225 | weld.Name = "W" | |
| 226 | weld.Part0 = a | |
| 227 | weld.Part1 = b | |
| 228 | weld.C0 = a.CFrame:inverse() * b.CFrame | |
| 229 | weld.Parent = a | |
| 230 | return weld; | |
| 231 | end | |
| 232 | ---------------------------------------------------- | |
| 233 | function Lerp(c1,c2,al) | |
| 234 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
| |
| 235 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
| |
| 236 | for i,v in pairs(com1) do | |
| 237 | com1[i] = v+(com2[i]-v)*al | |
| 238 | end | |
| 239 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
| 240 | end | |
| 241 | ---------------------------------------------------- | |
| 242 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
| 243 | local wld = Instance.new("Weld", wp1)
| |
| 244 | wld.Part0 = wp0 | |
| 245 | wld.Part1 = wp1 | |
| 246 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
| 247 | end | |
| 248 | ---------------------------------------------------- | |
| 249 | function weld5(part0, part1, c0, c1) | |
| 250 | weeld=Instance.new("Weld", part0)
| |
| 251 | weeld.Part0=part0 | |
| 252 | weeld.Part1=part1 | |
| 253 | weeld.C0=c0 | |
| 254 | weeld.C1=c1 | |
| 255 | return weeld | |
| 256 | end | |
| 257 | ---------------------------------------------------- | |
| 258 | function HasntTouched(plrname) | |
| 259 | local ret = true | |
| 260 | for _, v in pairs(Touche) do | |
| 261 | if v == plrname then | |
| 262 | ret = false | |
| 263 | end | |
| 264 | end | |
| 265 | return ret | |
| 266 | end | |
| 267 | ---------------------------------------------------- | |
| 268 | gavehp = false | |
| 269 | ||
| 270 | local ends = {"alive","rip"}
| |
| 271 | result = "" | |
| 272 | ||
| 273 | local g = Instance.new("Part",larm)
| |
| 274 | g.Material = "Neon" | |
| 275 | g.CanCollide = false | |
| 276 | g.Size = Vector3.new(1,1,1) | |
| 277 | local gm = Instance.new("SpecialMesh",g)
| |
| 278 | gm.MeshId = "rbxassetid://483388971" | |
| 279 | gm.TextureId = "rbxassetid://520016684" | |
| 280 | gm.Scale = Vector3.new(0.005,0.005,0.005) | |
| 281 | ||
| 282 | local cor = Instance.new("Weld")
| |
| 283 | cor.Part1 = g | |
| 284 | cor.Part0 = larm | |
| 285 | cor.Parent = char | |
| 286 | cor.C1 = CFrame.new(0.2,1.8,0) | |
| 287 | ||
| 288 | ---------------------------------------------------- | |
| 289 | newWeld(torso, larm, -1.5, 0.5, 0) | |
| 290 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 291 | newWeld(torso, rarm, 1.5, 0.5, 0) | |
| 292 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 293 | newWeld(torso, hed, 0, 1.5, 0) | |
| 294 | newWeld(torso, lleg, -0.5, -1, 0) | |
| 295 | lleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 296 | newWeld(torso, rleg, 0.5, -1, 0) | |
| 297 | rleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 298 | newWeld(root, torso, 0, -1, 0) | |
| 299 | torso.Weld.C1 = CFrame.new(0, -1, 0) | |
| 300 | ---------------------------------------------------- | |
| 301 | attack = false | |
| 302 | local m = 0 | |
| 303 | ---------------------------------------------------- | |
| 304 | char.Health:Destroy() | |
| 305 | mouse.KeyDown:connect(function(key) | |
| 306 | if key == "e" then | |
| 307 | if attack == false then | |
| 308 | attack = true | |
| 309 | NoAnims = true | |
| 310 | hum.Health = 150 | |
| 311 | ||
| 312 | result = ends[math.random(1,#ends)] | |
| 313 | ||
| 314 | local s = Instance.new("Sound",torso)
| |
| 315 | s.SoundId = "rbxassetid://140923474" | |
| 316 | s.Volume = 1 | |
| 317 | s.Pitch = 1 | |
| 318 | s.Looped = true | |
| 319 | s:Play() | |
| 320 | ||
| 321 | coroutine.wrap(function() | |
| 322 | s:Remove() | |
| 323 | end)() | |
| 324 | local s = Instance.new("Sound",torso)
| |
| 325 | s.SoundId = "rbxassetid://212887982" | |
| 326 | s.Volume = 1 | |
| 327 | s.Pitch = 1 | |
| 328 | s:Play() | |
| 329 | ||
| 330 | cor.Part0 = hed | |
| 331 | pcall(function() | |
| 332 | for i = 1, 20 do | |
| 333 | ||
| 334 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 335 | ||
| 336 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(30)), 0.2) | |
| 337 | ||
| 338 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 339 | ||
| 340 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1) | |
| 341 | ||
| 342 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 343 | ||
| 344 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 345 | ||
| 346 | cor.C0 = Lerp(cor.C0, CFrame.new(0.6,0,0)*CFrame.Angles(math.rad(50),0,0),0.2) | |
| 347 | rs:wait() | |
| 348 | ||
| 349 | end | |
| 350 | end) | |
| 351 | ||
| 352 | local pgui = p.PlayerGui | |
| 353 | ||
| 354 | local sc = Instance.new("ScreenGui",pgui)
| |
| 355 | local w1 = Instance.new("TextLabel",sc)
| |
| 356 | w1.Size = UDim2.new(1,0,1,0) | |
| 357 | w1.Text = "wo kalm dwn m8 u r gon gt rkt" | |
| 358 | w1.TextScaled = true | |
| 359 | w1.BackgroundColor3 = Color3.new(1,1,1) | |
| 360 | w1.BorderSizePixel = 0 | |
| 361 | ||
| 362 | coroutine.wrap(function() | |
| 363 | for i = 1, 20 do | |
| 364 | w1.BackgroundTransparency = i/10 | |
| 365 | w1.TextTransparency = i/10 | |
| 366 | end | |
| 367 | end)() | |
| 368 | ||
| 369 | pcall(function() | |
| 370 | for i = 1, 100 do | |
| 371 | rs:wait() | |
| 372 | m = m + 0.004 | |
| 373 | hum.Health = hum.Health-1 | |
| 374 | cor.C0 = Lerp(cor.C0, CFrame.new(0.6,0+m/2,0-m/2)*CFrame.Angles(math.rad(50) + m,0,0),0.2) | |
| 375 | ||
| 376 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5+m,0-m/3.5)*CFrame.Angles(math.rad(120) + m,math.rad(0),math.rad(30)), 0.2) | |
| 377 | ||
| 378 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5+m,0+m/3.5)*CFrame.Angles(math.rad(0) - m,math.rad(0),math.rad(0) + m), 0.2) | |
| 379 | ||
| 380 | end | |
| 381 | end) | |
| 382 | ||
| 383 | if result == "rip" then | |
| 384 | ||
| 385 | coroutine.wrap(function() | |
| 386 | wait(0.15) | |
| 387 | for i = 1, 60 do | |
| 388 | cor.Part0 = torso | |
| 389 | cor.C0 = Lerp(cor.C0,CFrame.new(9,-0.15,0)*CFrame.Angles(0,0,200),0.1) | |
| 390 | rs:wait() | |
| 391 | end | |
| 392 | end)() | |
| 393 | ||
| 394 | s:Remove() | |
| 395 | hum.WalkSpeed = 0 | |
| 396 | pcall(function() | |
| 397 | hum.JumpPower = 0 | |
| 398 | end) | |
| 399 | ||
| 400 | pcall(function() | |
| 401 | for i = 1, 20 do | |
| 402 | ||
| 403 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(30),math.rad(30)), 0.2) | |
| 404 | ||
| 405 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(-10),math.rad(-10)), 0.2) | |
| 406 | ||
| 407 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)), 0.2) | |
| 408 | ||
| 409 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0)), 0.2) | |
| 410 | ||
| 411 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(-10),math.rad(-5)), 0.4) | |
| 412 | ||
| 413 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(20),math.rad(20)), 0.4) | |
| 414 | ||
| 415 | rs:wait() | |
| 416 | end | |
| 417 | end) | |
| 418 | ||
| 419 | wait(3) | |
| 420 | ||
| 421 | coroutine.wrap(function() | |
| 422 | while true do | |
| 423 | wait(0.07) | |
| 424 | pcall(function() | |
| 425 | ||
| 426 | rarm.Weld.C0 = CFrame.new(1.5,0.5,0)*CFrame.Angles(math.random(0,3),math.random(0,7),math.random(30,45)) | |
| 427 | ||
| 428 | larm.Weld.C0 = CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.random(0,5),math.random(10,20),math.random(10,20)) | |
| 429 | ||
| 430 | hed.Weld.C0 = CFrame.new(0,1.5,0)*CFrame.Angles(math.random(20,30),math.random(0,4),math.random(0,3)) | |
| 431 | ||
| 432 | lleg.Weld.C0 = CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.random(0,5),math.random(10,15),math.random(5,10)) | |
| 433 | ||
| 434 | rleg.Weld.C0 = CFrame.new(0.5, -1, 0)*CFrame.Angles(math.random(0,4),math.random(20,30),math.random(20,30)) | |
| 435 | ||
| 436 | end) | |
| 437 | end | |
| 438 | end)() | |
| 439 | ||
| 440 | ||
| 441 | cor:Destroy() | |
| 442 | ||
| 443 | g.Anchored = true | |
| 444 | ||
| 445 | for i,v in pairs(char:GetChildren()) do | |
| 446 | if v:IsA("Part") then
| |
| 447 | v.Anchored = true | |
| 448 | elseif v:IsA("Accoutrement") then
| |
| 449 | v.Handle.Anchored = true | |
| 450 | end | |
| 451 | end | |
| 452 | ||
| 453 | cor.Part0 = larm | |
| 454 | m = 0 | |
| 455 | hum.MaxHealth = 0 | |
| 456 | ||
| 457 | local k = Instance.new("Sound",torso)
| |
| 458 | k.SoundId = "rbxassetid://154872806" | |
| 459 | k.Volume = 10 | |
| 460 | k.Pitch = 1 | |
| 461 | k:Play() | |
| 462 | ||
| 463 | local cf = torso.CFrame -Vector3.new(0,0.55,0) | |
| 464 | cf = cf*CFrame.Angles(math.rad(88.5),0,0) | |
| 465 | ||
| 466 | local b = Instance.new("Part",torso)
| |
| 467 | b.BrickColor = BrickColor.new("Really red")
| |
| 468 | b.Material = "Neon" | |
| 469 | b.Anchored = true | |
| 470 | b.CanCollide = false | |
| 471 | b.Size = Vector3.new(2,0.01,2) | |
| 472 | b.CFrame = cf | |
| 473 | ||
| 474 | local bm = Instance.new("CylinderMesh",b)
| |
| 475 | ||
| 476 | local cf2 = b.CFrame -Vector3.new(3,0,0) | |
| 477 | ||
| 478 | local b2 = Instance.new("Part",torso)
| |
| 479 | b2.BrickColor = BrickColor.new("Really red")
| |
| 480 | b2.Material = "Neon" | |
| 481 | b2.Anchored = true | |
| 482 | b2.CanCollide = false | |
| 483 | b2.Size = Vector3.new(2,0.01,2) | |
| 484 | b2.CFrame = cf2 | |
| 485 | ||
| 486 | local bm2 = Instance.new("CylinderMesh",b2)
| |
| 487 | ||
| 488 | ||
| 489 | for i = 1, 40 do | |
| 490 | wait() | |
| 491 | b.Size = Vector3.new(i/5,0,i/5) | |
| 492 | b.CFrame = cf | |
| 493 | ||
| 494 | b2.Size = Vector3.new(i/10,0,i/10) | |
| 495 | b2.CFrame = cf2 | |
| 496 | end | |
| 497 | ||
| 498 | local bg = Instance.new("BillboardGui", torso)
| |
| 499 | bg.Name = "rip" | |
| 500 | bg.Adornee = torso | |
| 501 | bg.Size = UDim2.new(1, 0, 1, 0) | |
| 502 | bg.StudsOffset = Vector3.new(0, 2, 0) | |
| 503 | ||
| 504 | local fr1 = Instance.new("TextLabel", bg)
| |
| 505 | fr1.Size = UDim2.new(1, 0, 1, 0) | |
| 506 | fr1.BorderSizePixel = 0 | |
| 507 | fr1.TextTransparency = 1 | |
| 508 | fr1.BackgroundTransparency = 1 | |
| 509 | fr1.Text = "r.i.p" | |
| 510 | fr1.TextScaled = true | |
| 511 | ||
| 512 | coroutine.wrap(function() | |
| 513 | for i = 1, 20 do | |
| 514 | rs:wait() | |
| 515 | fr1.TextTransparency = fr1.TextTransparency - 1/20 | |
| 516 | fr1.BackgroundTransparency = fr1.BackgroundTransparency - 1/20 | |
| 517 | end | |
| 518 | end)() | |
| 519 | ||
| 520 | coroutine.wrap(function() | |
| 521 | while true do | |
| 522 | ||
| 523 | for i = 0.01, 0.2 do | |
| 524 | fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(255,0,0),i) | |
| 525 | rs:wait() | |
| 526 | end | |
| 527 | ||
| 528 | for i = 0.01, 0.2 do | |
| 529 | fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(0,255,0),i) | |
| 530 | rs:wait() | |
| 531 | end | |
| 532 | ||
| 533 | for i = 0.01, 0.2 do | |
| 534 | fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(0,0,255),i) | |
| 535 | rs:wait() | |
| 536 | end | |
| 537 | ||
| 538 | wait() | |
| 539 | end | |
| 540 | end)() | |
| 541 | ||
| 542 | local x = Instance.new("Sound",torso)
| |
| 543 | x.SoundId = "rbxassetid://397069204" | |
| 544 | x.Looped = true | |
| 545 | x:Play() | |
| 546 | wait(9) | |
| 547 | ||
| 548 | local txts = {"R.I.P "..p.Name.." Died drinking his favorite soda","R.I.P "..p.Name.." Died because of the anime called bleach - i mean the drink.","R.I.P "..p.Name.." Potato.","666"}
| |
| 549 | ||
| 550 | local t1 = Instance.new("Part",workspace.Base)
| |
| 551 | t1.Name = "tombstone_dirt" | |
| 552 | t1.BrickColor = BrickColor.new("Reddish brown")
| |
| 553 | t1.CanCollide = false | |
| 554 | t1.CFrame = root.CFrame - Vector3.new(0,3.25,0) | |
| 555 | t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
| 556 | t1.Material = "Grass" | |
| 557 | t1.Size = Vector3.new(4,1,8) | |
| 558 | ||
| 559 | local tw = Instance.new("Weld")
| |
| 560 | ||
| 561 | local t2 = Instance.new("Part",t1)
| |
| 562 | t2.Name = "tombstone_stone" | |
| 563 | t2.CanCollide = false | |
| 564 | t2.BrickColor = BrickColor.new("")
| |
| 565 | t2.Anchored = false | |
| 566 | t2.CFrame = t1.CFrame + Vector3.new(0,0,-4) | |
| 567 | t2.Size = Vector3.new(4.2,5,1.2) | |
| 568 | ||
| 569 | local sg = Instance.new("SurfaceGui",t2)
| |
| 570 | sg.Enabled = true | |
| 571 | sg.Face = "Back" | |
| 572 | sg.Adornee = t2 | |
| 573 | local txts = txts[math.random(1,#txts)] | |
| 574 | ||
| 575 | local txt = Instance.new("TextLabel",sg)
| |
| 576 | txt.TextScaled = true | |
| 577 | txt.Text = txts | |
| 578 | txt.BackgroundTransparency = 1 | |
| 579 | txt.BorderSizePixel = 0 | |
| 580 | txt.Size = UDim2.new(1,0,1,0) | |
| 581 | ||
| 582 | txt.TextColor3 = Color3.new(1,1,1) | |
| 583 | if txts == "666" then | |
| 584 | txt.TextColor3 = Color3.new(1,0,0) | |
| 585 | end | |
| 586 | ||
| 587 | ||
| 588 | tw.Part1 = t2 | |
| 589 | tw.Part0 = t1 | |
| 590 | tw.Parent = char | |
| 591 | tw.C0 = CFrame.new(0,2.5,-4) | |
| 592 | ||
| 593 | coroutine.wrap(function() | |
| 594 | t1.CFrame = root.CFrame - Vector3.new(0,3.2,0) | |
| 595 | t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
| 596 | wait(0.1) | |
| 597 | t1.CFrame = root.CFrame - Vector3.new(0,3.2,0) | |
| 598 | t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
| 599 | t1.Anchored = true | |
| 600 | t2.Anchored = true | |
| 601 | t1.CanCollide = true | |
| 602 | t2.CanCollide = true | |
| 603 | end)() | |
| 604 | ||
| 605 | char:BreakJoints() | |
| 606 | ||
| 607 | elseif result == "alive" then | |
| 608 | attack = false | |
| 609 | NoAnims = false | |
| 610 | cor.Part0 = larm | |
| 611 | m = 0 | |
| 612 | end | |
| 613 | end | |
| 614 | end | |
| 615 | end) | |
| 616 | ||
| 617 | pcall(function() | |
| 618 | ---------------------------------------------------- | |
| 619 | mouse.KeyDown:connect(function(key) | |
| 620 | if string.byte(key) == 50 then | |
| 621 | char.Humanoid.WalkSpeed = 60 | |
| 622 | end | |
| 623 | end) | |
| 624 | mouse.KeyUp:connect(function(key) | |
| 625 | if string.byte(key) == 50 then | |
| 626 | char.Humanoid.WalkSpeed = 16 | |
| 627 | end | |
| 628 | end) | |
| 629 | ------------------------------- | |
| 630 | local animpose = "Idle" | |
| 631 | local lastanimpose = "Idle" | |
| 632 | local sine = 0 | |
| 633 | local change = 1 | |
| 634 | local val = 0 | |
| 635 | local ffing = false | |
| 636 | ------------------------------- | |
| 637 | game:GetService("RunService").RenderStepped:connect(function()
| |
| 638 | --[[if char.Humanoid.Jump == true then | |
| 639 | jump = true | |
| 640 | else | |
| 641 | jump = false | |
| 642 | end]] | |
| 643 | char.Humanoid.FreeFalling:connect(function(f) | |
| 644 | if f then | |
| 645 | ffing = true | |
| 646 | else | |
| 647 | ffing = false | |
| 648 | end | |
| 649 | end) | |
| 650 | sine = sine + change | |
| 651 | if jumpn == true then | |
| 652 | animpose = "Jumping" | |
| 653 | elseif ffing == true then | |
| 654 | animpose = "Freefalling" | |
| 655 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then | |
| 656 | animpose = "Idle" | |
| 657 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then | |
| 658 | animpose = "Walking" | |
| 659 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then | |
| 660 | animpose = "Running" | |
| 661 | end | |
| 662 | if animpose ~= lastanimpose then | |
| 663 | sine = 0 | |
| 664 | if animpose == "Idle" then | |
| 665 | for i = 1, 2 do | |
| 666 | if NoAnims == false then | |
| 667 | ||
| 668 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5+math.sin(sine/14)/9,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(30)), 0.2) | |
| 669 | ||
| 670 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5 + math.sin(sine/14)/9,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(30)), 0.2) | |
| 671 | ||
| 672 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 673 | ||
| 674 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1) | |
| 675 | ||
| 676 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 677 | ||
| 678 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 679 | ||
| 680 | end | |
| 681 | end | |
| 682 | ||
| 683 | elseif animpose == "Walking" then | |
| 684 | for i = 1, 2 do | |
| 685 | if NoAnims == false then | |
| 686 | ||
| 687 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.7,0.5,-0.35)*CFrame.Angles(math.rad(100),math.rad(0),math.rad(-90)), 0.1) | |
| 688 | ||
| 689 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-0.7,0.5,-0.35)*CFrame.Angles(math.rad(80),math.rad(0),math.rad(80)), 0.1) | |
| 690 | ||
| 691 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 692 | ||
| 693 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1) | |
| 694 | ||
| 695 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 696 | ||
| 697 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 698 | ||
| 699 | end | |
| 700 | end | |
| 701 | elseif animpose == "Running" then | |
| 702 | for i = 1, 2 do | |
| 703 | if NoAnims == false then | |
| 704 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 705 | ||
| 706 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 707 | ||
| 708 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 709 | ||
| 710 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.05) | |
| 711 | ||
| 712 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 713 | ||
| 714 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 715 | ||
| 716 | wait() | |
| 717 | end | |
| 718 | end | |
| 719 | else | |
| 720 | end | |
| 721 | end | |
| 722 | lastanimpose = animpose | |
| 723 | if animpose == "Idle" then | |
| 724 | if NoAnims == false then | |
| 725 | change = 0.5 | |
| 726 | ||
| 727 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.3,0.4+math.sin(sine/14)/9,0.2)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-30)), 0.2) | |
| 728 | ||
| 729 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.3,0.4 + math.sin(sine/14)/9,-0.2)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(30)), 0.2) | |
| 730 | ||
| 731 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2) | |
| 732 | ||
| 733 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1) | |
| 734 | ||
| 735 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 736 | ||
| 737 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 738 | ||
| 739 | cor.C0 = Lerp(cor.C0, CFrame.new(0,0.1,0.2)*CFrame.Angles(math.rad(10),math.pi,0),0.2) | |
| 740 | ||
| 741 | end | |
| 742 | ||
| 743 | elseif animpose == "Walking" then | |
| 744 | if NoAnims == false then | |
| 745 | change = 1 | |
| 746 | cor.C0 = Lerp(cor.C0, CFrame.new(0,0.1,0.2)*CFrame.Angles(math.rad(10),-math.pi/2,0),0.2) | |
| 747 | ||
| 748 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1) | |
| 749 | ||
| 750 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0) +- math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1) | |
| 751 | ||
| 752 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-0.07)*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)), 0.2) | |
| 753 | ||
| 754 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1) | |
| 755 | ||
| 756 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1) | |
| 757 | ||
| 758 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0) +- math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1) | |
| 759 | ||
| 760 | end | |
| 761 | ||
| 762 | elseif animpose == "Running" then | |
| 763 | if NoAnims == false then | |
| 764 | change = 0.5 | |
| 765 | ||
| 766 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.7 ,0.5,-0.5)*CFrame.Angles(math.rad(90)+ math.sin(sine/2.5)/2,0,.05), 0.2) | |
| 767 | ||
| 768 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-0.7,0.5,-0.5)*CFrame.Angles(math.rad(90)+ -math.sin(sine/2.5)/2,0,-.05), 0.2) | |
| 769 | ||
| 770 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0.5)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)),0.2) | |
| 771 | ||
| 772 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(-90), 0, math.rad(0)), 0.2) | |
| 773 | ||
| 774 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(85) + math.sin(sine/2.5)/2, 0, 0.05), .4) | |
| 775 | ||
| 776 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(85) + -math.sin(sine/2.5)/2, 0.05, 0), .4) | |
| 777 | ||
| 778 | end | |
| 779 | end | |
| 780 | end) | |
| 781 | end) |