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,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros")
- script.Parent = Player.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,Connect=function(self,f)self.Function=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 and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- 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 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})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- 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)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local plr = owner
- local char = plr.Character
- local hum = char.Humanoid
- local meshid = "http://www.roblox.com/asset/?id=3270017"
- local help = Instance.new("Part")
- help.Parent = game.Workspace
- help.Position = Vector3.new(100000000,100000000,10000000)
- help.Size = Vector3.new(2,2,2)
- help.Shape = ("Ball")
- help.Transparency = 1
- help.BrickColor = BrickColor.new("Forest green")
- help.CanCollide = false
- help.Material = ("Neon")
- local part = Instance.new("Part")
- part.Parent = game.Workspace
- part.Position = help.Position
- local mesh = Instance.new("SpecialMesh")
- mesh.Parent = part
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://1388740053"
- sound.Parent = game.Workspace
- sound.Volume = 10
- local tool = Instance.new("Tool")
- tool.Parent = plr.Backpack
- tool.Name = ("Blast")
- local ball = Instance.new("Part")
- ball.Parent = tool
- ball.Name = ("Handle")
- ball.Size = Vector3.new(2,2,2)
- ball.Shape = ("Ball")
- ball.TopSurface = ("Smooth")
- ball.Transparency = 1
- ball.CanCollide = false
- ball.BrickColor = BrickColor.new("Forest green")
- ball.Material = ("Neon")
- enabled = true
- tool.Equipped:connect(function(mouse)
- mouse.KeyDown:connect(function(key)
- if not enabled then return end
- enabled = false
- if key == "f" then
- local anim = Instance.new("Animation")
- anim.Parent = script
- local a = script:WaitForChild("Animation")
- anim.AnimationId = ("rbxassetid://2314109917")
- local ai = hum:LoadAnimation(a)
- ai:Play()
- wait(0.8)
- ai:Stop()
- help.Transparency = 0.6
- help.Anchored = true
- help.Position = char.HumanoidRootPart.Position
- for i = 1,5,1 do
- wait()
- sound:Play()
- part.Position = char.HumanoidRootPart.Position
- part.CanCollide = false
- part.Anchored = true
- part.BrickColor = BrickColor.new("Toothpaste")
- part.Transparency = 0.5
- help.Transparency = 0.6
- help.Size = Vector3.new(8,8,8)
- mesh.Scale = Vector3.new(25,25,25)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(12,12,12)
- mesh.Scale = Vector3.new(35,35,35)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(16,16,16)
- mesh.Scale = Vector3.new(45,45,45)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(20,20,20)
- mesh.Scale = Vector3.new(55,55,55)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(24,24,24)
- mesh.Scale = Vector3.new(65,65,65)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(28,28,28)
- mesh.Scale = Vector3.new(75,75,75)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Size = Vector3.new(32,32,32)
- mesh.Scale = Vector3.new(85,85,85)
- part.Size = Vector3.new(25,25,25)
- help.CFrame = char.HumanoidRootPart.CFrame
- wait(0.05)
- help.Transparency = 1
- part.Transparency = 1
- sound:Stop()
- end
- wait(1)
- enabled = true
- local en = true
- help.Touched:connect(function(hit)
- if not en then return end
- en = false
- local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if ehum and ehum ~= hum then
- ehum:TakeDamage(250)
- end
- end)
- wait(1)
- en = true
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment