SHOW:
|
|
- or go back to the newest paste.
| 1 | --{{Made by Strazos}}--
| |
| 2 | -- This script has been converted to FE by iPxter | |
| 3 | ||
| 4 | ||
| 5 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 6 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 7 | do | |
| 8 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 9 | script.Parent = Player.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,Connect=function(self,f)self.Function=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 and t.Function then | |
| 35 | t.Function(...) | |
| 36 | end | |
| 37 | end | |
| 38 | m.TrigEvent = te | |
| 39 | UIS.TrigEvent = te | |
| 40 | ||
| 41 | Event.OnServerEvent:Connect(function(plr,io) | |
| 42 | if plr~=Player then return end | |
| 43 | if io.isMouse then | |
| 44 | m.Target = io.Target | |
| 45 | m.Hit = io.Hit | |
| 46 | else | |
| 47 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 48 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 49 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 50 | end | |
| 51 | for _,t in pairs(CAS.Actions) do | |
| 52 | for _,k in pairs(t.Keys) do | |
| 53 | if k==io.KeyCode then | |
| 54 | t.Function(t.Name,io.UserInputState,io) | |
| 55 | end | |
| 56 | end | |
| 57 | end | |
| 58 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 59 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 60 | end | |
| 61 | end) | |
| 62 | Event.Parent = NLS([==[ | |
| 63 | local Player = game:GetService("Players").LocalPlayer
| |
| 64 | local Event = script:WaitForChild("UserInput_Event")
| |
| 65 | ||
| 66 | local UIS = game:GetService("UserInputService")
| |
| 67 | local input = function(io,a) | |
| 68 | if a then return end | |
| 69 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 70 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 71 | end | |
| 72 | UIS.InputBegan:Connect(input) | |
| 73 | UIS.InputEnded:Connect(input) | |
| 74 | ||
| 75 | local Mouse = Player:GetMouse() | |
| 76 | local h,t | |
| 77 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 78 | --If player is not moving their mouse, client won't fire events | |
| 79 | while wait(1/30) do | |
| 80 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 81 | h,t=Mouse.Hit,Mouse.Target | |
| 82 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 83 | end | |
| 84 | end]==],Player.Character) | |
| 85 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 86 | end | |
| 87 | ||
| 88 | local p = owner | |
| 89 | local char = p.Character | |
| 90 | local larm = char["Left Arm"] | |
| 91 | local rarm = char["Right Arm"] | |
| 92 | local lleg = char["Left Leg"] | |
| 93 | local rleg = char["Right Leg"] | |
| 94 | local hed = char.Head | |
| 95 | local torso = char.Torso | |
| 96 | local hum = char.Humanoid | |
| 97 | - | local cam = game.Workspace.CurrentCamera |
| 97 | + | local weld = Instance.new("Weld",torso)
|
| 98 | - | local root = char.HumanoidRootPart |
| 98 | + | weld.Part0 = torso |
| 99 | - | local deb = false |
| 99 | + | |
| 100 | - | local shot = 0 |
| 100 | + | larm.Transparency = 1 |
| 101 | - | local l = game:GetService("Lighting")
|
| 101 | + | rarm.Transparency = 1 |
| 102 | - | local rs = game:GetService("RunService").RenderStepped
|
| 102 | + | lleg.Transparency = 1 |
| 103 | - | local stanceToggle = "Normal" |
| 103 | + | rleg.Transparency = 1 |
| 104 | - | math.randomseed(os.time()) |
| 104 | + | |
| 105 | - | hum.WalkSpeed = 7 |
| 105 | + | torso.Transparency = 1 |
| 106 | - | char.Health:Destroy() |
| 106 | + | |
| 107 | - | hum.MaxHealth = 50000 |
| 107 | + | |
| 108 | - | wait(0.01) |
| 108 | + | local train = Instance.new("Part",torso)
|
| 109 | - | hum.Health = 50000 |
| 109 | + | train.Anchored = true |
| 110 | - | ---------------------------------------------------- |
| 110 | + | train.CanCollide = false |
| 111 | - | ---------------------------------------------------- |
| 111 | + | train.Size = Vector3.new(1,1,1) |
| 112 | - | shirt = Instance.new("Shirt", char)
|
| 112 | + | train.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0) |
| 113 | - | shirt.Name = "Shirt" |
| 113 | + | weld.Part1 = train |
| 114 | - | pants = Instance.new("Pants", char)
|
| 114 | + | weld.C1 = CFrame.new(0,-3,0) * CFrame.Angles(0,math.rad(180),0) |
| 115 | - | pants.Name = "Pants" |
| 115 | + | train.Anchored = false |
| 116 | - | char.Shirt.ShirtTemplate = "rbxassetid://237906462" |
| 116 | + | local TrainMesh = Instance.new("SpecialMesh",train)
|
| 117 | - | char.Pants.PantsTemplate = "rbxassetid://237906462" |
| 117 | + | TrainMesh.MeshType = Enum.MeshType.FileMesh |
| 118 | - | ---------------------------------------------------- |
| 118 | + | TrainMesh.Scale = Vector3.new(3,3,3) |
| 119 | - | ---------------------------------------------------- |
| 119 | + | TrainMesh.MeshId = "rbxassetid://471480829" |
| 120 | - | Debounces = {
|
| 120 | + | TrainMesh.TextureId = "rbxassetid://471480833" |
| 121 | - | on = false; |
| 121 | + | |
| 122 | - | ks = false; |
| 122 | + | |
| 123 | - | CanAttack = true; |
| 123 | + | hum.WalkSpeed = 120; |
| 124 | - | CanJoke = true; |
| 124 | + | |
| 125 | - | NoIdl = false; |
| 125 | + | |
| 126 | - | Slashing = false; |
| 126 | + | for i,v in pairs(char:GetChildren()) do |
| 127 | - | Slashed = false; |
| 127 | + | if v:IsA("Part") then
|
| 128 | - | Grabbing = false; |
| 128 | + | v.Transparency = 1; |
| 129 | - | Grabbed = false; |
| 129 | + | elseif v:IsA("Hat") then
|
| 130 | - | } |
| 130 | + | v:Destroy() |
| 131 | - | local Touche = {char.Name, }
|
| 131 | + | elseif v:IsA("Model") then
|
| 132 | - | ---------------------------------------------------- |
| 132 | + | v:Destroy() |
| 133 | - | function lerp(a, b, t) -- Linear interpolation |
| 133 | + | |
| 134 | - | return a + (b - a)*t |
| 134 | + | |
| 135 | ||
| 136 | ||
| 137 | - | function slerp(a, b, t) --Spherical interpolation |
| 137 | + | local function SFX(id) local s=Instance.new("Sound",torso); s.SoundId = "rbxassetid://"..id; s.Volume = 64364643643; return s; end
|
| 138 | - | dot = a:Dot(b) |
| 138 | + | train.Touched:connect(function(p) |
| 139 | - | if dot > 0.99999 or dot < -0.99999 then |
| 139 | + | if p.Parent then |
| 140 | - | return t <= 0.5 and a or b |
| 140 | + | if p.Parent:IsA("Model") then
|
| 141 | - | else |
| 141 | + | if game.Players:FindFirstChild(p.Parent.Name) then |
| 142 | - | r = math.acos(dot) |
| 142 | + | if p.Parent.Name ~= game.Players.LocalPlayer.Name then |
| 143 | - | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) |
| 143 | + | game.Players:FindFirstChild(p.Parent.Name).Character:BreakJoints() |
| 144 | - | end |
| 144 | + | local Whistle = SFX(154365429) |
| 145 | Whistle:Play() | |
| 146 | end | |
| 147 | - | function matrixInterpolate(a, b, t) |
| 147 | + | |
| 148 | - | local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components() |
| 148 | + | |
| 149 | - | local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components() |
| 149 | + | |
| 150 | - | local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position |
| 150 | + | |
| 151 | - | local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right |
| 151 | + | |
| 152 | - | local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up |
| 152 | + | local Music = SFX(468775372) |
| 153 | - | local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back |
| 153 | + | Music.Looped = true; |
| 154 | - | local t = v1:Dot(v2) |
| 154 | + | |
| 155 | - | if not (t < 0 or t == 0 or t > 0) then -- Failsafe |
| 155 | + | Music:Play(); |
| 156 | - | return CFrame.new() |
| 156 | + | |
| 157 | - | end |
| 157 | + | |
| 158 | - | return CFrame.new( |
| 158 | + | local particleemitter = Instance.new("ParticleEmitter", torso)
|
| 159 | - | v0.x, v0.y, v0.z, |
| 159 | + | particleemitter.Texture = "http://www.roblox.com/asset/?id=243088609" |
| 160 | - | v1.x, v1.y, v1.z, |
| 160 | + | particleemitter.Lifetime = NumberRange.new(4) |
| 161 | - | v2.x, v2.y, v2.z, |
| 161 | + | particleemitter.Speed = NumberRange.new(10) |
| 162 | - | v3.x, v3.y, v3.z) |
| 162 | + | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 2)})
|
| 163 | particleemitter.RotSpeed = NumberRange.new(-55, 55) | |
| 164 | - | ---------------------------------------------------- |
| 164 | + | particleemitter.Rate = 80 |
| 165 | - | function genWeld(a,b) |
| 165 | + | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.7), NumberSequenceKeypoint.new(0.9, 1), NumberSequenceKeypoint.new(1, 1)})
|
| 166 | - | local w = Instance.new("Weld",a)
|
| 166 | + | particleemitter.LightEmission = 0 |
| 167 | - | w.Part0 = a |
| 167 | + | particleemitter.EmissionDirection = "Back" |
| 168 | - | w.Part1 = b |
| 168 | + | particleemitter.Color = ColorSequence.new(Color3.new(255,255,255), Color3.new(255,255,255)) --Color here |
| 169 | - | return w |
| 169 | + | ------------------------------------------------- |
| 170 | --rgb function by Strazos-- | |
| 171 | - | function weld(a, b) |
| 171 | + | |
| 172 | - | local weld = Instance.new("Weld")
|
| 172 | + | function HSLtoRGB(hue, sat, light) |
| 173 | - | weld.Name = "W" |
| 173 | + | local c = light > .5 and (2 - 2 * light) * sat or (2 * light) * sat |
| 174 | - | weld.Part0 = a |
| 174 | + | local h2 = hue / 60 |
| 175 | - | weld.Part1 = b |
| 175 | + | local x = c * (1 - math.abs((h2 % 2) - 1)) |
| 176 | - | weld.C0 = a.CFrame:inverse() * b.CFrame |
| 176 | + | local rgbvals = {{c, x, 0}, {x, c, 0}, {0, c, x}, {0, x, c}, {x, 0, c}, {c, 0, x}}
|
| 177 | - | weld.Parent = a |
| 177 | + | local rgb = rgbvals[math.floor(h2) + 1] |
| 178 | - | return weld; |
| 178 | + | for i = 1, 3 do rgb[i] = rgb[i] + (light - .5 * c) end |
| 179 | return Color3.new(rgb[1], rgb[2], rgb[3]) | |
| 180 | - | ---------------------------------------------------- |
| 180 | + | |
| 181 | - | function Lerp(c1,c2,al) |
| 181 | + | |
| 182 | - | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
|
| 182 | + | local torso = script.Parent |
| 183 | - | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
|
| 183 | + | |
| 184 | - | for i,v in pairs(com1) do |
| 184 | + | spawn(function() |
| 185 | - | com1[i] = v+(com2[i]-v)*al |
| 185 | + | while wait() do |
| 186 | for i = 1,150 do | |
| 187 | - | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) |
| 187 | + | |
| 188 | train.Mesh.VertexColor = Vector3.new(HSLtoRGB(i*2,1,0.5).r,HSLtoRGB(i*2,1,0.5).g,HSLtoRGB(i*2,1,0.5).b) | |
| 189 | - | ---------------------------------------------------- |
| 189 | + | |
| 190 | - | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) |
| 190 | + | local reversei = 150 |
| 191 | - | local wld = Instance.new("Weld", wp1)
|
| 191 | + | for i = 1,150 do |
| 192 | - | wld.Part0 = wp0 |
| 192 | + | |
| 193 | - | wld.Part1 = wp1 |
| 193 | + | train.Mesh.VertexColor = Vector3.new(HSLtoRGB(reversei*2,1,0.5).r,HSLtoRGB(reversei*2,1,0.5).g,HSLtoRGB(reversei*2,1,0.5).b) |
| 194 | - | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) |
| 194 | + | reversei = reversei-1 |
| 195 | end | |
| 196 | - | ---------------------------------------------------- |
| 196 | + | |
| 197 | - | for i,v in pairs(char:children()) do |
| 197 | + | |
| 198 | - | if v:IsA("Hat") then
|
| 198 | + | |
| 199 | - | v:Destroy() |
| 199 | + | --------------------------------------------------- |
| 200 | - | end |
| 200 | + | local plr = game.Players.LocalPlayer |
| 201 | local chr = plr.Character | |
| 202 | - | for i,v in pairs(hed:children()) do |
| 202 | + | local maus = plr:GetMouse() |
| 203 | - | if v:IsA("Sound") then
|
| 203 | + | local PGui=plr.PlayerGui |
| 204 | - | v:Destroy() |
| 204 | + | local lleg = chr["Left Leg"] |
| 205 | - | end |
| 205 | + | local rleg = chr["Right Leg"] |
| 206 | local larm = chr["Left Arm"] | |
| 207 | - | ---------------------------------------------------- |
| 207 | + | local rarm = chr["Right Arm"] |
| 208 | - | function HasntTouched(plrname) |
| 208 | + | local hed = chr.Head |
| 209 | - | local ret = true |
| 209 | + | local rutprt = chr.HumanoidRootPart |
| 210 | - | for _, v in pairs(Touche) do |
| 210 | + | local torso = chr.Torso |
| 211 | - | if v == plrname then |
| 211 | + | local pseudohead=hed:Clone() |
| 212 | - | ret = false |
| 212 | + | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
|
| 213 | pseudohead.Name='PseudoHead' | |
| 214 | pseudohead.Parent=chr.Head | |
| 215 | - | return ret |
| 215 | + | local pseudoweld=Instance.new('Weld',torso)
|
| 216 | pseudoweld.Part0=hed | |
| 217 | - | ---------------------------------------------------- |
| 217 | + | pseudoweld.Name='PseudoHeadWeld' |
| 218 | - | larm.Size = larm.Size * 2 |
| 218 | + | pseudoweld.Part1=pseudohead |
| 219 | - | rarm.Size = rarm.Size * 2 |
| 219 | + | hed.Transparency=1 |
| 220 | - | lleg.Size = lleg.Size * 2 |
| 220 | + | for i,x in pairs(chr:GetChildren()) do |
| 221 | - | rleg.Size = rleg.Size * 2 |
| 221 | + | if x:IsA'HHat' then x:destroy'' end end |
| 222 | - | torso.Size = torso.Size * 2 |
| 222 | + | for i,x in pairs(chr:GetChildren()) do |
| 223 | - | hed.Size = hed.Size * 2 |
| 223 | + | for a,v in pairs(x:GetChildren()) do |
| 224 | - | root.Size = root.Size * 2 |
| 224 | + | if v:IsA'CharacterMesh' then v:destroy'' |
| 225 | - | ---------------------------------------------------- |
| 225 | + | |
| 226 | - | newWeld(torso, larm, -1.5, 0.5, 0) |
| 226 | + | |
| 227 | - | larm.Weld.C1 = CFrame.new(0, 0.5, 0) |
| 227 | + | end |