Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- --This script may not work because of 'Mouse is no longer active' as Studio tests have different results than InRealGame tests. Shame on you Roblox.
- --To fix that I will be remaking this script entirely as a require().
- wait(2)
- explosiondebounce = false
- function explosion(pos,color,grow)
- if explosiondebounce == false then
- explosiondebounce = true
- exp = Instance.new("Part")
- exp.Shape = Enum.PartType.Ball
- exp.Size = Vector3.new(1,1,1)
- exp.Material = Enum.Material.Neon
- exp.BrickColor = color
- exp.Anchored = true
- exp.CanCollide = false
- exp.CFrame = CFrame.new(pos.X,pos.Y,pos.Z)
- exp.Parent = workspace
- for i=1, 10 do
- wait(0.1)
- exp.Size = exp.Size + Vector3.new(grow,grow,grow)
- exp.Transparency = exp.Transparency + 0.1
- end
- exp:Destroy()
- explosiondebounce = false
- end
- end
- lp = owner
- char = lp.Character
- head = char.Head
- hum = char:FindFirstChildOfClass("Humanoid")
- hum.PlatformStand = true
- ra = char:FindFirstChild("Right Arm")
- wait(1)
- for i=1, 10 do
- wait(0.25)
- part = Instance.new("Part",workspace)
- part.Anchored = true
- part.Size = Vector3.new(2,2,2)
- part.CFrame = ra.CFrame + Vector3.new(math.random(-1,1),0,math.random(-1,1))
- part.BrickColor = BrickColor.new("Really red")
- part.Material = Enum.Material.Neon
- part.CanCollide = false
- part.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(math.random(5,10),math.random(5,10),math.random(5,10))
- game.Debris:AddItem(part,1)
- end
- gun = Instance.new("Tool")
- gun.Name = "Anti Thot gun"
- gun.GripPos = Vector3.new(0,0,1)
- handle = Instance.new("Part",gun)
- handle.Size = Vector3.new(0.675, 1.213, 2.123)
- handle.Name = "Handle"
- handle.BrickColor = BrickColor.Black()
- handle.Material = Enum.Material.Neon
- mesh = Instance.new("FileMesh",handle)
- mesh.MeshId = "rbxassetid://435705367"
- mesh.Scale = Vector3.new(0.675/10, 1.213/10, 2.123/10)
- fire = Instance.new("Sound",handle)
- fire.Volume = 0.5
- fire.SoundId = "rbxassetid://1095911222"
- fire.TimePosition = 2.2
- begone = Instance.new("Sound",head)
- begone.Volume = 1
- begone.SoundId = "rbxassetid://1095911222"
- begone:Play()
- repeat
- wait(0.01)
- until begone.IsLoaded and begone.IsPlaying
- for i=1, 8 do
- wait(0.25)
- part = Instance.new("Part",workspace)
- part.Anchored = true
- part.Size = Vector3.new(2,2,2)
- part.CFrame = ra.CFrame + Vector3.new(math.random(-1,1),0,math.random(-1,1))
- part.BrickColor = BrickColor.new("Really red")
- part.Material = Enum.Material.Neon
- part.CanCollide = false
- part.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(math.random(5,10),math.random(5,10),math.random(5,10))
- game.Debris:AddItem(part,1)
- end
- gun.Parent = char
- hum.PlatformStand = false
- explosion(ra.Position,BrickColor.new("Really red"),2.5)
- mouse = nil
- gun.Unequipped:connect(function()
- print("goodbye then")
- explosion(handle.Position,BrickColor.new("Really red"),1)
- end)
- gun.Equipped:connect(function(tmouse)
- mouse = tmouse
- print("time to banish some thots")
- explosion(handle.Position,BrickColor.new("Really red"),1)
- end)
- gun.Activated:connect(function()
- fire.TimePosition = 2.2
- fire:Play()
- local ray = Ray.new(handle.CFrame.p, (mouse.Hit.p - handle.CFrame.p).unit * 300)
- local part, position = workspace:FindPartOnRay(ray, lp.Character, false, true)
- local beam = Instance.new("Part", workspace)
- beam.BrickColor = handle.BrickColor
- beam.FormFactor = "Custom"
- beam.Material = "Neon"
- beam.Transparency = 0
- beam.Anchored = true
- beam.Locked = true
- beam.CanCollide = false
- local distance = (handle.CFrame.p - position).magnitude
- beam.Size = Vector3.new(0.3, 0.3, distance)
- beam.CFrame = CFrame.new(handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
- game:GetService("Debris"):AddItem(beam, 0.1)
- if part then
- local humanoid = part.Parent:FindFirstChild("Humanoid")
- if not humanoid then
- humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
- end
- if humanoid then
- victimchar = humanoid.Parent
- gc = victimchar:GetChildren()
- for a=1, 10 do
- wait(0.1)
- for i=1, #gc do
- if gc[i].ClassName == "Part" or gc[i].ClassName == "Union" or gc[i].ClassName == "MeshPart" then
- gc[i].Anchored = true
- gc[i].Transparency = gc[i].Transparency + 0.1
- if gc[i]:FindFirstChildOfClass("Decal") then
- gc[i]:FindFirstChildOfClass("Decal").Transparency = gc[i]:FindFirstChildOfClass("Decal").Transparency + 0.1
- end
- end
- if gc[i].ClassName == "Hat" or gc[i].ClassName == "Accessory" then
- gc[i]:FindFirstChildOfClass("Part").Transparency = gc[i]:FindFirstChildOfClass("Part").Transparency + 0.1
- end
- end
- end
- for i=1, #gc do
- if gc[i].ClassName == "Part" or gc[i].ClassName == "Union" or gc[i].ClassName == "MeshPart" then
- gc[i]:BreakJoints()
- end
- end
- end
- end
- end)
- wait(0.1)
- gun.Parent = nil
- wait(0.1)
- gun.Parent = char
- hum.Died:connect(function()
- de = Instance.new("Explosion")
- de.BlastPressure = 9999999
- de.BlastRadius = 9999999
- de.Position = head.Position
- de.Parent = workspace
- m = Instance.new("Message",workspace)
- m.Text = "PRAISE "..string.upper(char.Name).." "..tostring(math.random(1,100000)).." TIMES A DAY!\nBEGONE, THOT!"
- game.Debris:AddItem(m,5)
- end)
- while true do
- wait(0.01)
- handle.BrickColor = BrickColor.Random()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement