SHARE
TWEET

Wild Savanna (W.I.P) Script

a guest Jun 16th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Rem = game.Workspace.RemoteServer.ChangeValue
  2. local Players = game:GetService("Players")
  3. local Player = Players.LocalPlayer
  4. local Char = Player.Character
  5.  
  6.  
  7. local function StringToArray(String, Separator)
  8.     local Array = {}
  9.     local ExtStr = String
  10.     repeat
  11.         if ExtStr == "" or ExtStr == " " then
  12.            
  13.         else
  14.             local Start = string.find(ExtStr,Separator)
  15.             if Start ~= nil then
  16.                 local Arg = string.sub(ExtStr,0,Start-1)
  17.                 table.insert(Array,Arg)
  18.                 ExtStr = string.sub(ExtStr,Start+string.len(Separator))
  19.             else
  20.                 table.insert(Array,ExtStr)
  21.                 ExtStr = ""
  22.             end
  23.         end
  24.     until ExtStr == ""
  25.     if string.lower(Array[1]) == "/e" then
  26.         Array[1] = nil
  27.         for i, v in pairs(Array) do
  28.             if i == 1 then
  29.                
  30.             else
  31.                 Array[i-1] = v
  32.             end
  33.         end
  34.     end
  35.     return Array
  36. end
  37.  
  38. GetPlayerFromShortName = function(ShortName)
  39.     local Plr = nil
  40.     for i, v in ipairs(game.Players:GetPlayers()) do
  41.         if string.find(string.lower(v.Name),string.lower(ShortName)) ~= nil then
  42.             Plr = v
  43.         end
  44.     end
  45.     return Plr
  46. end
  47.  
  48. local function kill(Player)
  49.     if Player == "all" then
  50.         for i, v in pairs(Players:GetChildren())do
  51.             Char = v.Character
  52.             Rem:FireServer(Char.Health2, 0)
  53.         end
  54.     elseif Player == "others" then
  55.         for i, v in pairs(Players:GetChildren())do
  56.             if v ~= Players.LocalPlayer then
  57.                 Char = v.Character
  58.                 Rem:FireServer(Char.Health2, 0)
  59.             end
  60.         end
  61.     elseif Player == "me" then
  62.         Char = Players.LocalPlayer.Character
  63.         Rem:FireServer(Char.Health2, 0)
  64.     else
  65.         Player = GetPlayerFromShortName(Player)
  66.         Char = Player.Character
  67.         Rem:FireServer(Char.Health2, 0)
  68.     end
  69. end
  70.  
  71. local function Infh(Player)
  72.     if Player == "all" then
  73.         for i, v in pairs(Players:GetChildren())do
  74.             Char = v.Character
  75.             Rem:FireServer(Char.Health2, 9e5)
  76.         end
  77.     elseif Player == "others" then
  78.         for i, v in pairs(Players:GetChildren())do
  79.             if v ~= Players.LocalPlayer then
  80.                 Char = v.Character
  81.                 Rem:FireServer(Char.Health2, 9e5)
  82.             end
  83.         end
  84.     elseif Player == "me" then
  85.         Char = Players.LocalPlayer.Character
  86.         Rem:FireServer(Char.Health2, 9e5)
  87.     else
  88.         Player = GetPlayerFromShortName(Player)
  89.         Char = Player.Character
  90.         Rem:FireServer(Char.Health2, 9e5)
  91.     end
  92. end
  93.  
  94. Player.Chatted:Connect(function(m)
  95.     local a = StringToArray(m, " ")
  96.     if a[1] == "/infhlth" then
  97.         Infh(a[2])
  98.     elseif a[1] == "/kill"then
  99.         kill(a[2])
  100.     end
  101. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top