Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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 | Translated to FE by iPxter")
- 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 p = owner
- wait(1.5)
- local c = p.Character
- local atk = false
- local lerp = 0
- local sound = Instance.new("Sound",c.Torso)
- sound.SoundId = "rbxassetid://2013105032"
- sound.Volume = 6
- sound:Play()
- local torso = c.Torso
- local pew = Instance.new("Sound",c["Right Arm"])
- pew.SoundId = "rbxassetid://357614490"
- pew.Volume = 6
- c.Humanoid.Animator.Parent = nil
- torso["Right Shoulder"].C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(0,0,1.55)
- torso["Left Shoulder"].C0 = CFrame.new(-1.5,0.5,-0.5) * CFrame.Angles(0,0,-1.55)
- gui1=Instance.new("BillboardGui")
- gui1.Parent = c.Head
- gui1.Adornee = c.Head
- gui1.Size=UDim2.new(400.5,0,1,0)
- gui1.StudsOffset=Vector3.new(0,2,0)
- gui1.AlwaysOnTop = false
- text1=Instance.new("TextLabel")
- text1.Font = Enum.Font.SourceSans
- c.Humanoid.WalkSpeed = 60
- text1.TextColor3 = Color3.fromRGB(0,255,255)
- text1.TextStrokeTransparency = 0
- text1.TextWrapped = true
- text1.TextScaled = true
- text1.Text = "T Pose"
- text1.Size=UDim2.new(1,0,1,0)
- text1.Position=UDim2.new(0,0,0,0)
- text1.BackgroundTransparency = 1
- text1.Parent=gui1
- mouse.KeyDown:connect(function(k)
- if k == "l" and atk == false then
- atk = true
- lerp = 0.3
- for i = 1,10 do
- lerp = lerp - 0.03
- wait()
- torso["Right Shoulder"].C0 = torso["Right Shoulder"].C0 * CFrame.new(0,0.1,0) *CFrame.Angles(lerp,0,0)
- end
- if mouse.Target ~= nil then
- local part = Instance.new("Part",workspace)
- part.CanCollide = false
- part.CFrame = c["Right Arm"].CFrame * CFrame.new(0,-1,0)
- part.Anchored = true
- part.Size = Vector3.new(1,1,1)
- local part2 = Instance.new("Part",workspace)
- part2.CanCollide = false
- part2.CFrame = mouse.Hit
- part.Transparency = 1
- part2.Transparency = 1
- part2.Anchored = true
- part2.Size = Vector3.new(1,1,1)
- local joint = part.Position + part2.Position
- local distance = (part.Position - part2.Position).magnitude
- pew:Play()
- joint = joint/2
- local segment = Instance.new("Part",workspace)
- segment.Size = Vector3.new(.7,.7,distance)
- segment.Name = "LazerSegment"
- segment.Anchored = true
- segment.CanCollide = false
- segment.Material = "Neon"
- local naameval =Instance.new("StringValue",segment)
- naameval.Value = p.Name
- segment.CFrame = CFrame.new(part.Position,joint) * CFrame.new(0,0,-distance/2)
- part:Destroy()
- part2:Destroy()
- lerp = -0.3
- if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") then
- mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health = mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health - 30
- end
- end
- wait(0.5)
- for i = 1,10 do
- lerp = lerp + 0.03
- wait()
- torso["Right Shoulder"].C0 = torso["Right Shoulder"].C0 * CFrame.new(0,-0.1,0) *CFrame.Angles(lerp,0,0)
- end
- torso["Right Shoulder"].C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(0,0,1.55)
- atk = false
- end
- end)
- while wait() do
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == "LazerSegment" then
- if v.Value.Value == p.Name then
- v.Size = v.Size + Vector3.new(0.1,0.1,0)
- v.Transparency = v.Transparency + 0.1
- if v.Transparency > 1 then
- v:Destroy()
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement